-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Add Intl.DisplayNames types #44022
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 Intl.DisplayNames types #44022
Conversation
The TC39 proposal (https://github.com/tc39/proposal-intl-displaynames) reached stage 4 in September 2020. Fixes microsoft#41338
@DanielRosenwasser you previously commented on #40786 saying that Intl is not part of the main TC39 spec, so in #40709 we added a property to NumberFormatOptions to ES5 instead of ES2020. Where does Intl.DisplayNames fall? How do I tell so I can review these PRs myself? |
@DanielRosenwasser Friendly ping for the above question 😄 |
In the meantime, a strange request but I'd prefer it to have less jsdoc information. We ship all of these dts files to consumers on npm and web which means we need to try keep the filesize somewhat reasonable and the dts files account for the many mbs which people have to download before anything can happen. Any chance you can drop the |
@orta I would absolutely love to, as it was an absolute pain to get all the formatting correct. However, a lot of the other types do have the JSDoc there. Therefore, does it make sense to first drop all of these and then we update existing PRs to also drop the information? |
@DanielRosenwasser We would like to remove the local patch we have in DevTools. Could you please provide a status update for what we should do with shipping these internationalization type APIs? |
* Import of Intl.Locale from #39664 * Handle updating es2020.intl and add es2021 for new DateTimeFormatOptions options - re: #39664 * Extends DateTimeFormatOptions for new Intl APIs - re: #45420 * Handle migrating Intl.NumberFormat.formatToParts to es2018 (keeping esnext.intl around) * Adds Intl.DisplayNames to es2020 - re: #44022 * Remove attributes added in es2021 from es2020 - re: #42944 * Add a reference to es2021 in the command line parser * Adds some docs about the lib files * Baselines * Allow undefined in Intl inputs to allow for ergonomic usage of exactOptionalPropertyTypes - see #45652 * Adds some tests covering the APIs * Apply suggestions from code review Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> * Handle PR feedback * More review improvements Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
Thanks for the PR, I've merged these changes in with a big overhaul of all Intl APIs for 4.5 - #45647 |
The TC39 proposal (https://github.com/tc39/proposal-intl-displaynames)
reached stage 4 in September 2020.
Fixes #41338
Please verify that:
Backlog
milestone (required)master
branchgulp runtests
locally