GeezerVison is showing github.com — Adds more Intl.ResolvedDateTimeFormatOptions, and hooks up Intl for E… · microsoft/TypeScript@61d2939
File treeExpand file treeCollapse file tree Open diff view settings tests/baselines/reference
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: src/lib/es2021.d.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 | /// <reference lib="es2021.promise" /> | 3 | 3 | /// <reference lib="es2021.string" /> | 4 | 4 | /// <reference lib="es2021.weakref" /> | | 5 | +/// <reference lib="es2021.intl" /> |
Collapse file Copy file name to clipboardExpand all lines: src/lib/es2021.intl.d.ts +9Lines changed: 9 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,6 +8,15 @@ declare namespace Intl { | 8 | 8 | fractionalSecondDigits?: 0 | 1 | 2 | 3 | undefined; | 9 | 9 | } | 10 | 10 |
| | 11 | + interface ResolvedDateTimeFormatOptions { | | 12 | + formatMatcher?: "basic" | "best fit" | "best fit"; | | 13 | + dateStyle?: "full" | "long" | "medium" | "short"; | | 14 | + timeStyle?: "full" | "long" | "medium" | "short"; | | 15 | + hourCycle?: "h11" | "h12" | "h23" | "h24"; | | 16 | + dayPeriod?: "narrow" | "short" | "long"; | | 17 | + fractionalSecondDigits?: 0 | 1 | 2 | 3; | | 18 | + } | | 19 | + | 11 | 20 | interface NumberFormat { | 12 | 21 | formatRange(startDate: number | bigint, endDate: number | bigint): string; | 13 | 22 | formatRangeToParts(startDate: number | bigint, endDate: number | bigint): NumberFormatPart[]; | |
Collapse file Copy file name to clipboardExpand all lines: tests/baselines/reference/formatToPartsBigInt.symbols +6-6Lines changed: 6 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | // Test Intl methods with new parameter type | 5 | 5 | new Intl.NumberFormat("fr").formatToParts(3000n); | 6 | 6 | >new Intl.NumberFormat("fr").formatToParts : Symbol(Intl.NumberFormat.formatToParts, Decl(lib.es2018.intl.d.ts, --, --)) | 7 | | ->Intl.NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2018.intl.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) | 8 | | ->Intl : Symbol(Intl, Decl(lib.es5.d.ts, --, --), Decl(lib.es2017.intl.d.ts, --, --), Decl(lib.es2018.intl.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.intl.d.ts, --, --) ... and 1 more) | 9 | | ->NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2018.intl.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) | | 7 | +>Intl.NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2018.intl.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2021.intl.d.ts, --, --)) | | 8 | +>Intl : Symbol(Intl, Decl(lib.es5.d.ts, --, --), Decl(lib.es2017.intl.d.ts, --, --), Decl(lib.es2018.intl.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.intl.d.ts, --, --) ... and 2 more) | | 9 | +>NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2018.intl.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2021.intl.d.ts, --, --)) | 10 | 10 | >formatToParts : Symbol(Intl.NumberFormat.formatToParts, Decl(lib.es2018.intl.d.ts, --, --)) | 11 | 11 |
| 12 | 12 | new Intl.NumberFormat("fr").formatToParts(BigInt(123)); | 13 | 13 | >new Intl.NumberFormat("fr").formatToParts : Symbol(Intl.NumberFormat.formatToParts, Decl(lib.es2018.intl.d.ts, --, --)) | 14 | | ->Intl.NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2018.intl.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) | 15 | | ->Intl : Symbol(Intl, Decl(lib.es5.d.ts, --, --), Decl(lib.es2017.intl.d.ts, --, --), Decl(lib.es2018.intl.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.intl.d.ts, --, --) ... and 1 more) | 16 | | ->NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2018.intl.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) | | 14 | +>Intl.NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2018.intl.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2021.intl.d.ts, --, --)) | | 15 | +>Intl : Symbol(Intl, Decl(lib.es5.d.ts, --, --), Decl(lib.es2017.intl.d.ts, --, --), Decl(lib.es2018.intl.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.intl.d.ts, --, --) ... and 2 more) | | 16 | +>NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2018.intl.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2021.intl.d.ts, --, --)) | 17 | 17 | >formatToParts : Symbol(Intl.NumberFormat.formatToParts, Decl(lib.es2018.intl.d.ts, --, --)) | 18 | 18 | >BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) | 19 | 19 |
|
|