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 — fix: revamp es2020.intl.d.ts by longlho · Pull Request #42945 · microsoft/TypeScript

Conversation

@longlho

@longlho Long Ho (longlho) commented Feb 24, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

fractionalSecondDigits is in ES2021 (unpublished), not ES2020

  • Remove fractionalSecondDigits, dateStyle, timeStyle, dayPeriod since they're in ES2021 draft, not ES2020.
  • Clarify NumberFormatOptions, add list of sanctioned unit.

Fixes #42944

Sorry, something went wrong.

Uh oh!

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

All reactions
@typescript-bot TypeScript Bot (typescript-bot) added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Feb 24, 2021
@longlho Long Ho (longlho) mentioned this pull request Feb 24, 2021
Type issue with TS 4.2 formatjs/formatjs#2616
Closed
@DanielRosenwasser

Daniel Rosenwasser (DanielRosenwasser) commented Feb 24, 2021

Copy link
Copy Markdown
Member

Was this in TS4.1? If not, maybe we should revert for TS4.2 Ryan Cavanaugh (@RyanCavanaugh)

All reactions

Sorry, something went wrong.

Uh oh!

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

@longlho

Long Ho (longlho) commented Feb 24, 2021

Copy link
Copy Markdown
Contributor Author

I believe this was in 4.2 but not 4.1. Our workaround rn is to pin to 4.1

All reactions

Sorry, something went wrong.

Uh oh!

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

@longlho
Long Ho (longlho) force-pushed the patch-1 branch from 3a31bd4 to b87ac2b Compare February 25, 2021 04:51
@longlho Long Ho (longlho) changed the title fix: remove fractionalSecondDigits from es2020.intl.d.ts fix: revamp es2020.intl.d.ts Feb 25, 2021
@longlho

Long Ho (longlho) commented Feb 25, 2021

Copy link
Copy Markdown
Contributor Author

Daniel Rosenwasser (@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.

All reactions

Sorry, something went wrong.

Uh oh!

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

@longlho
fix: revamp es2020.intl.d.ts
a4f4583
- Remove `fractionalSecondDigits`, `dateStyle`, `timeStyle`, `dayPeriod`
since they're in ES2021 draft, not ES2020.
- Clarify NumberFormatOptions, add list of sanctioned unit
@longlho
Long Ho (longlho) force-pushed the patch-1 branch from b87ac2b to a4f4583 Compare February 25, 2021 17:20
@longlho

Long Ho (longlho) commented Mar 3, 2021

Copy link
Copy Markdown
Contributor Author

gentle ping Ryan Cavanaugh (@RyanCavanaugh) :)

All reactions

Sorry, something went wrong.

Uh oh!

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

@sandersn
Nathan Shively-Sanders (sandersn) requested review from Orta Therox (orta) and Nathan Shively-Sanders (sandersn) March 4, 2021 15:10
@sandersn Nathan Shively-Sanders (sandersn) assigned Orta Therox (orta) Mar 4, 2021
@sandersn

Nathan Shively-Sanders (sandersn) commented Mar 4, 2021

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

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

@longlho

Long Ho (longlho) commented Mar 4, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

Nathan Shively-Sanders (@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 RangeError. Specifically in this spec: https://402.ecma-international.org/7.0/#sec-initializenumberformat

Step 7 says numberingSystem is a string with no limited set of values, default to undefined (that's what GetOption does). This is why literal union change was reverted because the spec has no limit on sets of values. The previous union was pulled from LDML UTS#35 which is a separate spec.
However, step 19 says notation must be a string from a set of 4 values « "standard", "scientific", "engineering", "compact" », and default to standard. This is where literal union makes sense.

DanielRosenwasser reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@longlho Long Ho (longlho) mentioned this pull request Apr 10, 2021
TypeScript 4.2 Iteration Plan #41601
Closed
@DanielRosenwasser

Daniel Rosenwasser (DanielRosenwasser) commented May 10, 2021

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) test this
TypeScript Bot (@typescript-bot) test dt
TypeScript Bot (@typescript-bot) user test this

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 May 10, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the extended test suite on this PR at a4f4583. You can monitor the build here.

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 May 10, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the parallelized community code test suite on this PR at a4f4583. You can monitor the build here.

All reactions

Sorry, something went wrong.

Uh oh!

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

@DanielRosenwasser

Daniel Rosenwasser (DanielRosenwasser) commented May 10, 2021

Copy link
Copy Markdown
Member

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 May 10, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the parallelized Definitely Typed test suite on this PR at a4f4583. You can monitor the build here.

All reactions

Sorry, something went wrong.

Uh oh!

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

@typescript-bot TypeScript Bot (typescript-bot) mentioned this pull request May 10, 2021
🤖 User test baselines have changed for patch-1 typescript-bot/TypeScript#181
Open
@typescript-bot

TypeScript Bot (typescript-bot) commented May 10, 2021

Copy link
Copy Markdown
Contributor

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

All reactions

Sorry, something went wrong.

Uh oh!

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

@tomsontom Tom Schindl (tomsontom) mentioned this pull request Jul 6, 2021
Upgrade to "June 15, 2021 Release" leads to build errors because of Intl.DateTimeFormatOptions#fractionalSecondDigits adobe/react-spectrum#2096
Closed
@IllusionMH Andrii Dieiev (IllusionMH) mentioned this pull request Aug 12, 2021
Intl.ResolvedDateTimeFormatOptions is missing properties #45420
Closed
@orta

Orta Therox (orta) commented Sep 8, 2021

Copy link
Copy Markdown
Contributor

Deprecated by #45647 - thanks Long Ho (@longlho)

All reactions

Sorry, something went wrong.

Uh oh!

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

@orta Orta Therox (orta) closed this Sep 8, 2021
@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) Awaiting requested review from sandersn
@orta Orta Therox (orta) Awaiting requested review from orta

Uh oh!

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

Assignees

@orta Orta Therox (orta)

Labels

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

Projects

PR Backlog
Archived in project

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

es2020.intl.d.ts is inaccurate

Uh oh!

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

5 participants

@longlho @DanielRosenwasser @sandersn @typescript-bot @orta
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.