-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Adds [unit] and [unitDisplay] to NumberFormatOptions #38013
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
Adds [unit] and [unitDisplay] to NumberFormatOptions #38013
Conversation
This PR is perfectly fine, but while you're at it would be nice to get notation in there too :) |
Notation is covered in #37721 |
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.
Did a read through some of the docs, looks good to me
I'll move this over to es2020.intl.d.ts |
What's going on with this? I'm using Typescript 4.1.3 and still getting an error I'm similarly getting internationalized units by using edit: adding "ES2020" to my "lib" option in my tsconfig fixes the first issue, but the second persists. I checked the definition and sure enough "unit" was missed from potential part types. Reported in #42004 |
Fixes #38012.
Adds the
unit
andunitDisplay
option toNumberFormatOptions
insrc/lib/es5.d.ts