File tree 6 files changed +47
-4
lines changed
6 files changed +47
-4
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ const libEntries: [string, string][] = [
215
215
[ "es2022.regexp" , "lib.es2022.regexp.d.ts" ] ,
216
216
[ "es2023.array" , "lib.es2023.array.d.ts" ] ,
217
217
[ "es2023.collection" , "lib.es2023.collection.d.ts" ] ,
218
+ [ "es2023.intl" , "lib.es2023.intl.d.ts" ] ,
218
219
[ "esnext.array" , "lib.es2023.array.d.ts" ] ,
219
220
[ "esnext.collection" , "lib.es2023.collection.d.ts" ] ,
220
221
[ "esnext.symbol" , "lib.es2019.symbol.d.ts" ] ,
Original file line number Diff line number Diff line change @@ -223,11 +223,20 @@ declare namespace Intl {
223
223
) : UnicodeBCP47LocaleIdentifier [ ] ;
224
224
} ;
225
225
226
+ interface NumberFormatOptionsSignDisplayRegistry {
227
+ auto : any ;
228
+ never : any ;
229
+ always : any ;
230
+ exceptZero : any ;
231
+ }
232
+
233
+ type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry ;
234
+
226
235
interface NumberFormatOptions {
227
236
numberingSystem : string | undefined ;
228
237
compactDisplay ?: "short" | "long" | undefined ;
229
238
notation ?: "standard" | "scientific" | "engineering" | "compact" | undefined ;
230
- signDisplay ?: "auto" | "never" | "always" | "exceptZero" | undefined ;
239
+ signDisplay ?: NumberFormatOptionsSignDisplay | undefined ;
231
240
unit ?: string | undefined ;
232
241
unitDisplay ?: "short" | "long" | "narrow" | undefined ;
233
242
currencySign ?: string | undefined ;
@@ -236,7 +245,7 @@ declare namespace Intl {
236
245
interface ResolvedNumberFormatOptions {
237
246
compactDisplay ?: "short" | "long" ;
238
247
notation : "standard" | "scientific" | "engineering" | "compact" ;
239
- signDisplay : "auto" | "never" | "always" | "exceptZero" ;
248
+ signDisplay : NumberFormatOptionsSignDisplay ;
240
249
unit ?: string ;
241
250
unitDisplay ?: "short" | "long" | "narrow" ;
242
251
currencySign ?: string ;
Original file line number Diff line number Diff line change 1
1
/// <reference lib="es2022" />
2
2
/// <reference lib="es2023.array" />
3
3
/// <reference lib="es2023.collection" />
4
+ /// <reference lib="es2023.intl" />
Original file line number Diff line number Diff line change
1
+ declare namespace Intl {
2
+ interface NumberFormatUseGroupingRegistry {
3
+ true : any ;
4
+ false : any ;
5
+ min2 : any ;
6
+ auto : any ;
7
+ always : any ;
8
+ }
9
+
10
+ interface NumberFormatSignDisplayRegistry {
11
+ negative : any ;
12
+ }
13
+
14
+ interface NumberFormatOptions {
15
+ roundingPriority ?: "auto" | "morePrecision" | "lessPrecision" | undefined ;
16
+ roundingIncrement ?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined ;
17
+ roundingMode ?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined ;
18
+ trailingZeroDisplay ?: "auto" | "stripIfInteger" | undefined ;
19
+ }
20
+
21
+ interface ResolvedNumberFormatOptions {
22
+ roundingPriority : "auto" | "morePrecision" | "lessPrecision" ;
23
+ roundingMode : "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" ;
24
+ roundingIncrement : 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 ;
25
+ trailingZeroDisplay : "auto" | "stripIfInteger" ;
26
+ }
27
+ }
Original file line number Diff line number Diff line change @@ -4409,12 +4409,16 @@ declare namespace Intl {
4409
4409
4410
4410
var Collator : CollatorConstructor ;
4411
4411
4412
+ interface NumberFormatOptionsUseGroupingRegistry { }
4413
+
4414
+ type NumberFormatOptionsUseGrouping = keyof NumberFormatOptionsUseGroupingRegistry | boolean ;
4415
+
4412
4416
interface NumberFormatOptions {
4413
4417
localeMatcher ?: string | undefined ;
4414
4418
style ?: string | undefined ;
4415
4419
currency ?: string | undefined ;
4416
4420
currencyDisplay ?: string | undefined ;
4417
- useGrouping ?: boolean | undefined ;
4421
+ useGrouping ?: NumberFormatOptionsUseGrouping | undefined ;
4418
4422
minimumIntegerDigits ?: number | undefined ;
4419
4423
minimumFractionDigits ?: number | undefined ;
4420
4424
maximumFractionDigits ?: number | undefined ;
@@ -4433,7 +4437,7 @@ declare namespace Intl {
4433
4437
maximumFractionDigits : number ;
4434
4438
minimumSignificantDigits ?: number ;
4435
4439
maximumSignificantDigits ?: number ;
4436
- useGrouping : boolean ;
4440
+ useGrouping : NumberFormatOptionsUseGrouping ;
4437
4441
}
4438
4442
4439
4443
interface NumberFormat {
Original file line number Diff line number Diff line change 68
68
" es2022.regexp" ,
69
69
" es2023.array" ,
70
70
" es2023.collection" ,
71
+ " es2023.intl" ,
71
72
" esnext.decorators" ,
72
73
" esnext.intl" ,
73
74
" esnext.disposable" ,
You can’t perform that action at this time.
0 commit comments