-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Add missing currencyDisplay to resolved number format options #44006
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
Add missing currencyDisplay to resolved number format options #44006
Conversation
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
I'm not sure why it thinks I don't have a linked issue, it's in the description. Probably didn't format that correctly. |
I believe it expects you to just include the |
src/lib/es5.d.ts
Outdated
@@ -4311,6 +4311,7 @@ declare namespace Intl { | |||
style: string; | |||
currency?: string; | |||
currencyDisplay?: string; | |||
currencySign?: string; |
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.
Shouldn't this, and currencyDisplay
, go in the es2020.intl.d.ts interface instead?
From MDN Compatibility Chart it looks like this was released at the same time as all of the other options listed in the es2020 interface.
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.
my bad, I saw it was added to the available options in es5 here https://github.com/microsoft/TypeScript/pull/40709/files
so I assumed it would also be in the resolved options at that point
I'm happy to move it
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.
moved, though I'm not 100% on how I set up the tests for it
also, worried that while it fixes a bug, it's a bit breaking because it was added into es5 half a year ago
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.
@DanielRosenwasser previously commented that Intl isn't part of the ecmascript standard, so I think it should actually stay in ES5. Daniel, can you confirm?
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.
We want this PR as it is, es2020 is the right pattern - these APIs may not tie directly to the esXXXX specs but they are released and supported in a similar way to how we structure these libs. This came out in 2020 and we should reflect that via the target
- which this PR does.
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.
This PR is good and we should get it in for 4.5 - I'll give Daniel a few days to give any last opinions and I'll merge otherwise.
I've rebased this after #45647 got merged and assuming it's green, I'll merge tomorrow |
Looks like the new tests are still failing after the merge from main. |
gentle nudge about the tests from main |
Once the tests pass I'll merge this for 4.6 |
Please verify that:
Backlog
milestone (required)master
branchgulp runtests
locallyRefer to CONTRIBUTING.MD for more details.
https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
Fixes #43958