-
Notifications
You must be signed in to change notification settings - Fork 12.8k
compact missing from Int.NumberFormat.formatToParts #42063
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
Comments
You are targetting ES3, but the 'compact' notation is an ES2020 feature. |
I'm not. I don't know why the playground link, when opened, indeed shows 'ES3', but the config as included in the issue uses I've also linked to the source code for |
I've found a few more missing types:
(also reported to MDN). |
Fixed by #42066 |
TypeScript Version: 4.2.0-dev.20201221
Search Terms:
NumberFormat.formatToParts
,compact
Expected behavior:
part: 'compact'
is a valid part type, as per EMCA 402, section 12.1.7 (PartitionNotationSubPattern), step 4. - c. - iv. - 2.:Note that the MDN documentation for
Intl.NumberFormat.prototype.formatToParts()
doesn't mention this part type either; see mdn/content#516.Actual behavior:
The
Intl.NumberFormatPartTypes
type should include"compact"
.Related Issues:
Code
Output
Compiler Options
Playground Link: Provided
The text was updated successfully, but these errors were encountered: