GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Intl 2021 Updates by orta · Pull Request #45647 · microsoft/TypeScript

Conversation

@orta

@orta Orta Therox (orta) commented Aug 30, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Re: #45646 - no breaking changes in here though

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

  • Add Intl.locale types #39664
  • Intl.ResolvedDateTimeFormatOptions is missing properties #45420
  • Add Intl.DisplayNames types #44022
  • es2020.intl.d.ts is inaccurate #42944
  • Intl types: Better typing for exactOptionalPropertyTypes needed #45652

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Orta Therox (orta) added 8 commits August 30, 2021 21:42
@orta
Import of Intl.Locale from microsoft#39664
ad15e54
@orta
Handle updating es2020.intl and add es2021 for new DateTimeFormatOpti…
872894d
…ons options - re: microsoft#39664
@orta
Extends DateTimeFormatOptions for new Intl APIs - re: microsoft#45420
2656cd8
@orta
Handle migrating Intl.NumberFormat.formatToParts to es2018 (keeping e…
f481743
…snext.intl around)
@orta
Adds Intl.DisplayNames to es2020 - re: microsoft#44022
2e2f755
@orta
Remove attributes added in es2021 from es2020 - re: microsoft#42944
df508a0
@orta
Add a reference to es2021 in the command line parser
ff94585
@orta
Adds some docs about the lib files
9edc1f7
@typescript-bot TypeScript Bot (typescript-bot) assigned Orta Therox (orta) Aug 30, 2021
@typescript-bot TypeScript Bot (typescript-bot) added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Aug 30, 2021
@orta
Baselines
5f67f65
@orta
Orta Therox (orta) requested review from Daniel Rosenwasser (DanielRosenwasser) and Nathan Shively-Sanders (sandersn) August 31, 2021 14:38
@orta

Orta Therox (orta) commented Aug 31, 2021

Copy link
Copy Markdown
Contributor Author

TypeScript Bot (@typescript-bot) run dt

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot

TypeScript Bot (typescript-bot) commented Aug 31, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Orta Therox (orta) added 2 commits August 31, 2021 16:38
@orta
Allow undefined in Intl inputs to allow for ergonomic usage of exactO…
689bf6f
…ptionalPropertyTypes - see microsoft#45652
@orta
Adds some tests covering the APIs
fdbc99a
@orta

Orta Therox (orta) commented Aug 31, 2021

Copy link
Copy Markdown
Contributor Author

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)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@orta

Orta Therox (orta) commented Aug 31, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@longlho

Long Ho (longlho) commented Aug 31, 2021

Copy link
Copy Markdown
Contributor

Yup will take a look asap

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sandersn
Nathan Shively-Sanders (sandersn) requested changes Sep 3, 2021
View reviewed changes

@sandersn Nathan Shively-Sanders (sandersn) left a comment

Copy link
Copy Markdown
Member

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.

Just a lot of minor edit suggestions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/lib/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/lib/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/lib/es2018.intl.d.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/lib/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/lib/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/lib/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/lib/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/lib/es2020.intl.d.ts Outdated
Comment on lines 220 to 223
hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined;
}

interface DateTimeFormatOptions {

@sandersn Nathan Shively-Sanders (sandersn) Sep 3, 2021

Copy link
Copy Markdown
Member

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.

Probably should merge these two DateTimeFormatOptions declarations

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

orta reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread src/lib/es2020.intl.d.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

longlho
Long Ho (longlho) suggested changes Sep 4, 2021
View reviewed changes

@longlho Long Ho (longlho) left a comment

Copy link
Copy Markdown
Contributor

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/lib/es2018.intl.d.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/lib/es2018.intl.d.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/lib/es2021.intl.d.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/lib/es2021.intl.d.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Orta Therox (orta) and others added 3 commits September 6, 2021 15:48
@orta @sandersn
Apply suggestions from code review
01a6f78
Co-authored-by: Nathan Shively-Sanders <[email protected]>
@orta
Handle PR feedback
aecec76
@orta
Merge
d09f8c8
@orta

Orta Therox (orta) commented Sep 6, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

longlho
Long Ho (longlho) approved these changes Sep 6, 2021
View reviewed changes
Comment thread src/lib/es2021.intl.d.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/lib/es2020.intl.d.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@longlho

Long Ho (longlho) commented Sep 6, 2021

Copy link
Copy Markdown
Contributor

Editorial suggestions but overall lgtm

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@orta
More review improvements
e79c4cd
sandersn
Nathan Shively-Sanders (sandersn) approved these changes Sep 7, 2021
View reviewed changes
@orta

Orta Therox (orta) commented Sep 8, 2021

Copy link
Copy Markdown
Contributor Author

Thanks folks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@orta
Orta Therox (orta) merged commit 07fd7bc into microsoft:main Sep 8, 2021
This was referenced Sep 8, 2021
Add Intl.locale types #39664
Closed
Intl.ResolvedDateTimeFormatOptions is missing properties #45420
Closed
Add Intl.DisplayNames types #44022
Closed
es2020.intl.d.ts is inaccurate #42944
Closed
Intl types: Better typing for exactOptionalPropertyTypes needed #45652
Closed
Add Intl.Locale to es2020 lib #37326
Closed
4.5 Intl changes overview #45646
Closed
Intl.NumberFormatOptions type restriction #43336
Closed
fix(41299): Support Intl.NumberFormat.formatToParts in ES2018 #44566
Closed
Support Intl.NumberFormat.formatToParts in ES2018 #41299
Closed
Add missing currencyDisplay to resolved number format options #44006
Merged
fix: revamp es2020.intl.d.ts #42945
Closed
fix: add es2016.intl.d.ts #39662
Closed
@orta Orta Therox (orta) mentioned this pull request Sep 16, 2021
Adds more Intl.ResolvedDateTimeFormatOptions, and hooks up Intl for ES2021 #45905
Merged
@bolatovumar Umar Bolatov (bolatovumar) mentioned this pull request Nov 6, 2021
"exceptZero" for "signDisplay" option of Intl.NumberFormat() constructor options object #46712
Closed
@SuaYoo sua yoo (SuaYoo) mentioned this pull request Nov 20, 2021
Add frontend localization support webrecorder/browsertrix#18
Merged
@dairyisscary Eric Kim-Butler (dairyisscary) mentioned this pull request Nov 24, 2021
Type issue with TS4.5.2 formatjs/formatjs#3276
Closed
@saschanaz Kagami Sascha Rosylight (saschanaz) mentioned this pull request Dec 4, 2021
formatRange[ToParts] should go Intl.DateTimeFormat but instead is in NumberFormat #47024
Closed
@tao-cumplido Tao Cumplido (tao-cumplido) mentioned this pull request Dec 14, 2021
Intl.DisplayNames.prototype.of should return string | undefined #47143
Closed
@gfyoung gfyoung (gfyoung) mentioned this pull request Dec 18, 2021
Intl.DisplayNamesOptions missing property locale #46845
Closed
@tchetwin Thomas Chetwin (tchetwin) mentioned this pull request Mar 11, 2022
Intl.DisplayNames options object type needs to be split #48218
Closed
@jakebailey Jake Bailey (jakebailey) mentioned this pull request Mar 31, 2022
feat(46907): Add Intl.ListFormat type declarations #47254
Merged
@AchoArnold Acho Arnold (AchoArnold) mentioned this pull request Jun 19, 2022
TS2339: Property 'DisplayNames' does not exist on type 'typeof Intl'. nuxt/typescript#551
Closed
@j-ulrich Jochen Ulrich (j-ulrich) mentioned this pull request Apr 12, 2023
Intl.DisplayNames missing #41338
Closed
This was referenced Oct 12, 2023
fix: refactor validateLangTag intlify/utils#23
Merged
fix: add Intl.getCanonicalLocales type definition #56079
Merged
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@sandersn Nathan Shively-Sanders (sandersn) sandersn approved these changes
@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) Awaiting requested review from DanielRosenwasser
+1 more reviewer
@longlho Long Ho (longlho) longlho approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@orta Orta Therox (orta)

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@orta @typescript-bot @longlho @oceandrama @sandersn
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.