File tree 6 files changed +28
-8
lines changed
6 files changed +28
-8
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,12 @@ declare namespace Intl {
37
37
supportedLocalesOf ( locales : string | string [ ] , options ?: { localeMatcher ?: "lookup" | "best fit" } ) : string [ ] ;
38
38
} ;
39
39
40
+ // We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here:
40
41
type ES2018NumberFormatPartType = "literal" | "nan" | "infinity" | "percent" | "integer" | "group" | "decimal" | "fraction" | "plusSign" | "minusSign" | "percentSign" | "currency" | "code" | "symbol" | "name" ;
42
+ type ES2020NumberFormatPartType = "compact" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "unit" | "unknown" ;
43
+
41
44
interface NumberFormatPart {
42
- type : ES2018NumberFormatPartType ;
45
+ type : ES2018NumberFormatPartType | ES2020NumberFormatPartType ;
43
46
value : string ;
44
47
}
45
48
Original file line number Diff line number Diff line change @@ -197,24 +197,19 @@ declare namespace Intl {
197
197
) : UnicodeBCP47LocaleIdentifier [ ] ;
198
198
} ;
199
199
200
- type ES2020NumberFormatPartType = ES2018NumberFormatPartType | "compact" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "unit" | "unknown" ;
201
- interface NumberFormatPart {
202
- type : ES2020NumberFormatPartType
203
- }
204
-
205
200
interface NumberFormatOptions {
206
201
compactDisplay ?: "short" | "long" | undefined ;
207
202
notation ?: "standard" | "scientific" | "engineering" | "compact" | undefined ;
208
203
signDisplay ?: "auto" | "never" | "always" | undefined ;
209
- unit ?: NumberFormatUnit | undefined ;
204
+ unit ?: string | undefined ;
210
205
unitDisplay ?: "short" | "long" | "narrow" | undefined ;
211
206
}
212
207
213
208
interface ResolvedNumberFormatOptions {
214
209
compactDisplay ?: "short" | "long" ;
215
210
notation ?: "standard" | "scientific" | "engineering" | "compact" ;
216
211
signDisplay ?: "auto" | "never" | "always" ;
217
- unit ?: NumberFormatUnit ;
212
+ unit ?: string ;
218
213
unitDisplay ?: "short" | "long" | "narrow" ;
219
214
}
220
215
Original file line number Diff line number Diff line change
1
+ //// [libCompileChecks.ts]
2
+ // This test is effectively the 'lib check' for all our .d.ts files because we use skipLibCheck
3
+ // as false everywhere.
4
+
5
+ //// [libCompileChecks.js]
6
+ // This test is effectively the 'lib check' for all our .d.ts files because we use skipLibCheck
7
+ // as false everywhere.
Original file line number Diff line number Diff line change
1
+ === tests/cases/compiler/libCompileChecks.ts ===
2
+ // This test is effectively the 'lib check' for all our .d.ts files because we use skipLibCheck
3
+ No type information for this code.// as false everywhere.
4
+ No type information for this code.
Original file line number Diff line number Diff line change
1
+ === tests/cases/compiler/libCompileChecks.ts ===
2
+ // This test is effectively the 'lib check' for all our .d.ts files because we use skipLibCheck
3
+ No type information for this code.// as false everywhere.
4
+ No type information for this code.
Original file line number Diff line number Diff line change
1
+ // @lib : esnext, dom
2
+ // @target : esnext
3
+ // @skipLibCheck : false
4
+ // @skipDefaultLibCheck : false
5
+
6
+ // This test is effectively the 'lib check' for all our .d.ts files because we use skipLibCheck
7
+ // as false everywhere.
You can’t perform that action at this time.
0 commit comments