Skip to content

Commit

Permalink
Internationalized/NumberParser: fix TS5.5 build errors (#6329)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Lu <[email protected]>
  • Loading branch information
Renegade334 and LFDanLu authored May 16, 2024
1 parent 5cacbdb commit e16aa4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/@internationalized/number/src/NumberParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ class NumberParserImpl {
// extra step for rounding percents to what our formatter would output
let options = {
...this.options,
style: 'decimal',
minimumFractionDigits: Math.min(this.options.minimumFractionDigits + 2, 20),
maximumFractionDigits: Math.min(this.options.maximumFractionDigits + 2, 20)
style: 'decimal' as const,
minimumFractionDigits: Math.min((this.options.minimumFractionDigits ?? 0) + 2, 20),
maximumFractionDigits: Math.min((this.options.maximumFractionDigits ?? 0) + 2, 20)
};
return (new NumberParser(this.locale, options)).parse(new NumberFormatter(this.locale, options).format(newValue));
}
Expand Down

1 comment on commit e16aa4d

@rspbot
Copy link

@rspbot rspbot commented on e16aa4d May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.