fix: make language parameter optional in FormattedString.pre#56
Merged
KnightNiwrem merged 1 commit intoFeb 6, 2026
Merged
Conversation
The `pre` function in entity-tag.ts accepts an optional language parameter, but the static and instance methods on FormattedString require it. This inconsistency causes TypeScript errors when calling FormattedString.pre(text) without a language argument. Add the optional modifier to both method signatures to match the underlying entity tag function.
Contributor
Author
|
Do i need to bump a version to |
Collaborator
No need |
Collaborator
|
Thanks for the PQ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
pre()function inentity-tag.tsaccepts an optionallanguageparameter (language?: string), but theFormattedString.prestatic and instance methods informat.tsrequire it as mandatory (language: string). This inconsistency causes TypeScript compilation errors when callingFormattedString.pre(text)without specifying a language.Changes
languageparameter optional inFormattedString.prestatic method (format.ts:355)languageparameter optional inFormattedString.preinstance method (format.ts:662)Both now match the signature of the underlying
pre()entity tag function inentity-tag.ts:95.