X Tutup
The Wayback Machine - https://web.archive.org/web/20220111035545/https://github.com/microsoft/TypeScript/pull/45647
Skip to content
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

Intl 2021 Updates #45647

Merged
merged 15 commits into from Sep 8, 2021
Merged

Intl 2021 Updates #45647

merged 15 commits into from Sep 8, 2021

Conversation

@orta
Copy link
Member

@orta orta commented Aug 30, 2021

Re: #45646 - no breaking changes in here though

This is quite a few PRs + issues combined, rebased etc:

I've tried to reduce the overall character count for some of the docs (e.g. removing some JSDocs which are redundant because the type system will tell you the types of things) and removed all the specs links, I can't imagine your average Intl API consumer wanting to read the spec (over MDN).

Also adds some fresh docs about how lib files work to the README, covering how Intl is a wee bit special in comparison to some of the other cases we have in the .d.ts files.

@orta orta requested review from DanielRosenwasser and sandersn Aug 31, 2021
@orta
Copy link
Member Author

@orta orta commented Aug 31, 2021

@typescript-bot
Copy link
Collaborator

@typescript-bot typescript-bot commented Aug 31, 2021

Heya @orta, I've started to run the parallelized Definitely Typed test suite on this PR at 5f67f65. You can monitor the build here.

@orta
Copy link
Member Author

@orta orta commented Aug 31, 2021

I've double checked all the es5 Intl properties, and they are in the right place (they were spec'd in 2012 which is a reasonable approximation IMO)

@orta
Copy link
Member Author

@orta orta commented Aug 31, 2021

@longlho any chance I could get your eyes over this? (and sorry it's taken a while!)

@longlho
Copy link
Contributor

@longlho longlho commented Aug 31, 2021

Yup will take a look asap

Copy link
Member

@sandersn sandersn left a comment

Just a lot of minor edit suggestions.

src/lib/README.md Show resolved Hide resolved
src/lib/README.md Outdated Show resolved Hide resolved
src/lib/es2018.intl.d.ts Show resolved Hide resolved
src/lib/README.md Outdated Show resolved Hide resolved
src/lib/README.md Outdated Show resolved Hide resolved
src/lib/README.md Outdated Show resolved Hide resolved
src/lib/README.md Outdated Show resolved Hide resolved
hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined;
}

interface DateTimeFormatOptions {
Copy link
Member

@sandersn sandersn Sep 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should merge these two DateTimeFormatOptions declarations

src/lib/es2020.intl.d.ts Show resolved Hide resolved
Copy link
Contributor

@longlho longlho left a comment

Overall I think es2021 is missing a ton of stuff but I think it's a good enough set of changes in the scaffolding for others to fill in.

src/lib/es2018.intl.d.ts Show resolved Hide resolved
src/lib/es2018.intl.d.ts Outdated Show resolved Hide resolved
src/lib/es2021.intl.d.ts Show resolved Hide resolved
src/lib/es2021.intl.d.ts Show resolved Hide resolved
orta and others added 3 commits Sep 6, 2021
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
@orta
Copy link
Member Author

@orta orta commented Sep 6, 2021

OK, thanks for the feedback everyone - assuming this is green I will merge weds and start closing all the linked PRs

longlho
longlho approved these changes Sep 6, 2021
src/lib/es2021.intl.d.ts Outdated Show resolved Hide resolved
src/lib/es2020.intl.d.ts Outdated Show resolved Hide resolved
@longlho
Copy link
Contributor

@longlho longlho commented Sep 6, 2021

Editorial suggestions but overall lgtm

@oceandrama
Copy link

@oceandrama oceandrama commented Sep 7, 2021

@orta
Hi! Could you add typings for DateTimeFormat.formatRange (https://github.com/tc39/proposal-intl-DateTimeFormat-formatRange)?
This is already in stage 4, but I couldn't find the types for it in this repository

@longlho
Copy link
Contributor

@longlho longlho commented Sep 7, 2021

@oceandrama I think that can be a follow-up diff. ES2021 in this diff is still missing a bunch of normative changes

@orta
Copy link
Member Author

@orta orta commented Sep 8, 2021

Thanks folks

@orta orta merged commit 07fd7bc into microsoft:main Sep 8, 2021
10 checks passed
@orta orta mentioned this pull request Sep 8, 2021
@orta orta mentioned this pull request Sep 8, 2021
4 tasks
@orta orta mentioned this pull request Sep 8, 2021
5 tasks
@orta orta mentioned this pull request Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
X Tutup