-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Intl.NumberFormat: Add latest options, fix previous library discrepancies #56902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
df89080
Intl.NumberFormat: fix previous divergences from spec
Renegade334 f9612a0
Intl.NumberFormat: add ECMA-402 version 10 changes under es2023.intl
Renegade334 50e295d
Intl.NumberFormat: narrow to literal union types
Renegade334 7a9f949
Intl.NumberFormat: move ES23 methods from esnext.intl to es2023.intl
Renegade334 ef87a15
es2023.intl: CRLF
Renegade334 8b96367
es2023.intl: Fix interface names
Renegade334 0b137b9
Intl.NumberFormat: conditional type override for useGrouping
Renegade334 bb13158
Intl.NumberFormat: add false to ResolvedNumberFormatOptionsUseGrouping
Renegade334 b857806
Intl.NumberFormat: narrow currencyDisplay type
Renegade334 481c244
Intl.NumberFormat: narrow currencySign type
Renegade334 0734e7a
es2020.intl: make NumberFormatOptions.numberingSystem optional
Renegade334 d0876e5
Update baselines to include lib.es2023.intl.d.ts
Renegade334 72f7d44
Add conformance tests for es2020.intl / es2023.intl
Renegade334 7b73dc7
Intl.NumberFormat: remove duplicate method override from es2020.bigint
Renegade334 6ee47d4
Intl.NumberFormat: Registry-ise NumberFormatPartType
Renegade334 f8e9dda
Intl.NumberFormatPartType: add tests / update baselines
Renegade334 ca699fc
Restore name of exported type Intl.NumberFormatPartTypes
Renegade334 40cdb05
Move NumberFormat#formatRange tests from ES2021 to ES2023
Renegade334 a6261f9
Remove test formatToPartsBigInt (duplicate of tests included in bigin…
Renegade334 90b7d94
Merge branch 'main' into intl-numberformat
Renegade334 37c5d52
Type string registry interfaces as {key: never}
Renegade334 ff58e75
ResolvedNumberFormatOptions: {minimum,maximum}FractionDigits to optional
Renegade334 254a8ce
Merge branch 'main' into intl-numberformat
Renegade334 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Type string registry interfaces as {key: never}
- Loading branch information
commit 37c5d527b960bfff38a8bc6a09bbee9c30ffaa1f
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
declare namespace Intl { | ||
interface DateTimeFormatPartTypesRegistry { | ||
unknown: any; | ||
unknown: never; | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4410,17 +4410,17 @@ declare namespace Intl { | |
var Collator: CollatorConstructor; | ||
|
||
interface NumberFormatOptionsStyleRegistry { | ||
decimal: any; | ||
percent: any; | ||
currency: any; | ||
decimal: never; | ||
percent: never; | ||
currency: never; | ||
} | ||
|
||
type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ES5
ES2020
|
||
|
||
interface NumberFormatOptionsCurrencyDisplayRegistry { | ||
code: any; | ||
symbol: any; | ||
name: any; | ||
code: never; | ||
symbol: never; | ||
name: never; | ||
} | ||
|
||
type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ES5
ES2020
|
||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES2020
ES2023