-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
fix: revamp es2020.intl.d.ts #42945
fix: revamp es2020.intl.d.ts #42945
Conversation
Was this in TS4.1? If not, maybe we should revert for TS4.2 @RyanCavanaugh |
I believe this was in 4.2 but not 4.1. Our workaround rn is to pin to 4.1 |
@DanielRosenwasser I apologize for increasing the scope of this PR but es2020 at its current state has some ES2021 stuff and also is missing some constraints in terms of unit. |
- Remove `fractionalSecondDigits`, `dateStyle`, `timeStyle`, `dayPeriod` since they're in ES2021 draft, not ES2020. - Clarify NumberFormatOptions, add list of sanctioned unit
gentle ping @RyanCavanaugh :) |
Maybe it was a related change, but I thought we had already made the types of something in intl into precise literal unions and then had to revert to the base primitive. Finding that change is the first step to reviewing this one, to make sure we don't end up waffling back and forth. |
@sandersn so the context here is different and shouldn't be treated as blanket literal union vs none. The literal unions for those values are fine because the spec indicates that values outside of those choices, as of ES2020, will throw a Step 7 says |
@typescript-bot test this |
Heya @DanielRosenwasser, I've started to run the extended test suite on this PR at a4f4583. You can monitor the build here. |
Heya @DanielRosenwasser, I've started to run the parallelized community code test suite on this PR at a4f4583. You can monitor the build here. |
@typescript-bot run dt |
Heya @DanielRosenwasser, I've started to run the parallelized Definitely Typed test suite on this PR at a4f4583. You can monitor the build here. |
The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master. |
fractionalSecondDigits
is in ES2021 (unpublished), not ES2020fractionalSecondDigits
,dateStyle
,timeStyle
,dayPeriod
since they're in ES2021 draft, not ES2020.Fixes #42944