typescript 5.3.0-dev.20230816 → 5.3.0-dev.20230818
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.decorators.d.ts +3 -6
- package/lib/lib.es2015.collection.d.ts +1 -2
- package/lib/lib.es2015.core.d.ts +1 -1
- package/lib/lib.es2015.iterable.d.ts +4 -5
- package/lib/lib.es2015.promise.d.ts +1 -1
- package/lib/lib.es2015.symbol.d.ts +1 -1
- package/lib/lib.es2016.array.include.d.ts +1 -1
- package/lib/lib.es2016.d.ts +1 -1
- package/lib/lib.es2016.full.d.ts +1 -1
- package/lib/lib.es2017.full.d.ts +1 -1
- package/lib/lib.es2017.intl.d.ts +11 -12
- package/lib/lib.es2017.object.d.ts +3 -3
- package/lib/lib.es2018.asynciterable.d.ts +1 -1
- package/lib/lib.es2018.full.d.ts +1 -1
- package/lib/lib.es2018.intl.d.ts +1 -2
- package/lib/lib.es2018.promise.d.ts +1 -1
- package/lib/lib.es2018.regexp.d.ts +5 -5
- package/lib/lib.es2019.array.d.ts +14 -18
- package/lib/lib.es2019.intl.d.ts +1 -1
- package/lib/lib.es2019.object.d.ts +1 -1
- package/lib/lib.es2020.bigint.d.ts +7 -7
- package/lib/lib.es2020.date.d.ts +1 -1
- package/lib/lib.es2020.intl.d.ts +11 -13
- package/lib/lib.es2020.promise.d.ts +1 -1
- package/lib/lib.es2021.intl.d.ts +5 -6
- package/lib/lib.es2021.promise.d.ts +3 -3
- package/lib/lib.es2021.weakref.d.ts +2 -2
- package/lib/lib.es2022.error.d.ts +2 -2
- package/lib/lib.es2022.intl.d.ts +1 -2
- package/lib/lib.es2022.sharedmemory.d.ts +2 -2
- package/lib/lib.es2023.array.d.ts +61 -61
- package/lib/lib.es5.d.ts +74 -88
- package/lib/lib.esnext.disposable.d.ts +10 -10
- package/lib/lib.esnext.full.d.ts +1 -1
- package/lib/lib.esnext.intl.d.ts +7 -7
- package/lib/lib.scripthost.d.ts +1 -4
- package/lib/lib.webworker.importscripts.d.ts +0 -1
- package/lib/tsc.js +1249 -1398
- package/lib/tsserver.js +1789 -2017
- package/lib/typescript.d.ts +339 -117
- package/lib/typescript.js +1789 -2017
- package/lib/typingsInstaller.js +124 -110
- package/package.json +4 -2
package/lib/lib.decorators.d.ts
CHANGED
|
@@ -24,21 +24,18 @@ type ClassMemberDecoratorContext =
|
|
|
24
24
|
| ClassGetterDecoratorContext
|
|
25
25
|
| ClassSetterDecoratorContext
|
|
26
26
|
| ClassFieldDecoratorContext
|
|
27
|
-
| ClassAccessorDecoratorContext
|
|
28
|
-
;
|
|
27
|
+
| ClassAccessorDecoratorContext;
|
|
29
28
|
|
|
30
29
|
/**
|
|
31
30
|
* The decorator context types provided to any decorator.
|
|
32
31
|
*/
|
|
33
32
|
type DecoratorContext =
|
|
34
33
|
| ClassDecoratorContext
|
|
35
|
-
| ClassMemberDecoratorContext
|
|
36
|
-
;
|
|
34
|
+
| ClassMemberDecoratorContext;
|
|
37
35
|
|
|
38
36
|
type DecoratorMetadataObject = Record<PropertyKey, unknown> & object;
|
|
39
37
|
|
|
40
|
-
type DecoratorMetadata =
|
|
41
|
-
typeof globalThis extends { Symbol: { readonly metadata: symbol } } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined;
|
|
38
|
+
type DecoratorMetadata = typeof globalThis extends { Symbol: { readonly metadata: symbol; }; } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined;
|
|
42
39
|
|
|
43
40
|
/**
|
|
44
41
|
* Context provided to a class decorator.
|
|
@@ -17,7 +17,6 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
interface Map<K, V> {
|
|
20
|
-
|
|
21
20
|
clear(): void;
|
|
22
21
|
/**
|
|
23
22
|
* @returns true if an element in the Map existed and has been removed, or false if the element does not exist.
|
|
@@ -47,7 +46,7 @@ interface Map<K, V> {
|
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
interface MapConstructor {
|
|
50
|
-
new(): Map<any, any>;
|
|
49
|
+
new (): Map<any, any>;
|
|
51
50
|
new <K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
|
|
52
51
|
readonly prototype: Map<any, any>;
|
|
53
52
|
}
|
package/lib/lib.es2015.core.d.ts
CHANGED
|
@@ -553,5 +553,5 @@ interface StringConstructor {
|
|
|
553
553
|
* @param template A well-formed template string call site representation.
|
|
554
554
|
* @param substitutions A set of substitution values.
|
|
555
555
|
*/
|
|
556
|
-
raw(template: { raw: readonly string[] | ArrayLike<string
|
|
556
|
+
raw(template: { raw: readonly string[] | ArrayLike<string>; }, ...substitutions: any[]): string;
|
|
557
557
|
}
|
|
@@ -155,11 +155,11 @@ interface ReadonlyMap<K, V> {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
interface MapConstructor {
|
|
158
|
-
new(): Map<any, any>;
|
|
158
|
+
new (): Map<any, any>;
|
|
159
159
|
new <K, V>(iterable?: Iterable<readonly [K, V]> | null): Map<K, V>;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
interface WeakMap<K extends WeakKey, V> {
|
|
162
|
+
interface WeakMap<K extends WeakKey, V> {}
|
|
163
163
|
|
|
164
164
|
interface WeakMapConstructor {
|
|
165
165
|
new <K extends WeakKey, V>(iterable: Iterable<readonly [K, V]>): WeakMap<K, V>;
|
|
@@ -207,13 +207,13 @@ interface SetConstructor {
|
|
|
207
207
|
new <T>(iterable?: Iterable<T> | null): Set<T>;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
interface WeakSet<T extends WeakKey> {
|
|
210
|
+
interface WeakSet<T extends WeakKey> {}
|
|
211
211
|
|
|
212
212
|
interface WeakSetConstructor {
|
|
213
213
|
new <T extends WeakKey = WeakKey>(iterable: Iterable<T>): WeakSet<T>;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
interface Promise<T> {
|
|
216
|
+
interface Promise<T> {}
|
|
217
217
|
|
|
218
218
|
interface PromiseConstructor {
|
|
219
219
|
/**
|
|
@@ -315,7 +315,6 @@ interface Uint8ClampedArray {
|
|
|
315
315
|
interface Uint8ClampedArrayConstructor {
|
|
316
316
|
new (elements: Iterable<number>): Uint8ClampedArray;
|
|
317
317
|
|
|
318
|
-
|
|
319
318
|
/**
|
|
320
319
|
* Creates an array from an array-like or iterable object.
|
|
321
320
|
* @param arrayLike An array-like or iterable object to convert to an array.
|
|
@@ -36,7 +36,7 @@ interface PromiseConstructor {
|
|
|
36
36
|
* @param values An array of Promises.
|
|
37
37
|
* @returns A new Promise.
|
|
38
38
|
*/
|
|
39
|
-
all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]
|
|
39
|
+
all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>;
|
|
40
40
|
|
|
41
41
|
// see: lib.es2015.iterable.d.ts
|
|
42
42
|
// all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
|
package/lib/lib.es2016.d.ts
CHANGED
package/lib/lib.es2016.full.d.ts
CHANGED
package/lib/lib.es2017.full.d.ts
CHANGED
package/lib/lib.es2017.intl.d.ts
CHANGED
|
@@ -17,19 +17,18 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
declare namespace Intl {
|
|
20
|
-
|
|
21
20
|
interface DateTimeFormatPartTypesRegistry {
|
|
22
|
-
day: any
|
|
23
|
-
dayPeriod: any
|
|
24
|
-
era: any
|
|
25
|
-
hour: any
|
|
26
|
-
literal: any
|
|
27
|
-
minute: any
|
|
28
|
-
month: any
|
|
29
|
-
second: any
|
|
30
|
-
timeZoneName: any
|
|
31
|
-
weekday: any
|
|
32
|
-
year: any
|
|
21
|
+
day: any;
|
|
22
|
+
dayPeriod: any;
|
|
23
|
+
era: any;
|
|
24
|
+
hour: any;
|
|
25
|
+
literal: any;
|
|
26
|
+
minute: any;
|
|
27
|
+
month: any;
|
|
28
|
+
second: any;
|
|
29
|
+
timeZoneName: any;
|
|
30
|
+
weekday: any;
|
|
31
|
+
year: any;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry;
|
|
@@ -21,7 +21,7 @@ interface ObjectConstructor {
|
|
|
21
21
|
* Returns an array of values of the enumerable properties of an object
|
|
22
22
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
23
23
|
*/
|
|
24
|
-
values<T>(o: { [s: string]: T } | ArrayLike<T>): T[];
|
|
24
|
+
values<T>(o: { [s: string]: T; } | ArrayLike<T>): T[];
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Returns an array of values of the enumerable properties of an object
|
|
@@ -33,7 +33,7 @@ interface ObjectConstructor {
|
|
|
33
33
|
* Returns an array of key/values of the enumerable properties of an object
|
|
34
34
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
35
35
|
*/
|
|
36
|
-
entries<T>(o: { [s: string]: T } | ArrayLike<T>): [string, T][];
|
|
36
|
+
entries<T>(o: { [s: string]: T; } | ArrayLike<T>): [string, T][];
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Returns an array of key/values of the enumerable properties of an object
|
|
@@ -45,5 +45,5 @@ interface ObjectConstructor {
|
|
|
45
45
|
* Returns an object containing all own property descriptors of an object
|
|
46
46
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
47
47
|
*/
|
|
48
|
-
getOwnPropertyDescriptors<T>(o: T): {[P in keyof T]: TypedPropertyDescriptor<T[P]
|
|
48
|
+
getOwnPropertyDescriptors<T>(o: T): { [P in keyof T]: TypedPropertyDescriptor<T[P]>; } & { [x: string]: PropertyDescriptor; };
|
|
49
49
|
}
|
package/lib/lib.es2018.full.d.ts
CHANGED
package/lib/lib.es2018.intl.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
declare namespace Intl {
|
|
20
|
-
|
|
21
20
|
// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories
|
|
22
21
|
type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other";
|
|
23
22
|
type PluralRuleType = "cardinal" | "ordinal";
|
|
@@ -52,7 +51,7 @@ declare namespace Intl {
|
|
|
52
51
|
new (locales?: string | string[], options?: PluralRulesOptions): PluralRules;
|
|
53
52
|
(locales?: string | string[], options?: PluralRulesOptions): PluralRules;
|
|
54
53
|
|
|
55
|
-
supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit" }): string[];
|
|
54
|
+
supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[];
|
|
56
55
|
};
|
|
57
56
|
|
|
58
57
|
// We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here:
|
|
@@ -26,5 +26,5 @@ interface Promise<T> {
|
|
|
26
26
|
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
|
|
27
27
|
* @returns A Promise for the completion of the callback.
|
|
28
28
|
*/
|
|
29
|
-
finally(onfinally?: (() => void) | undefined | null): Promise<T
|
|
29
|
+
finally(onfinally?: (() => void) | undefined | null): Promise<T>;
|
|
30
30
|
}
|
|
@@ -18,14 +18,14 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
interface RegExpMatchArray {
|
|
20
20
|
groups?: {
|
|
21
|
-
[key: string]: string
|
|
22
|
-
}
|
|
21
|
+
[key: string]: string;
|
|
22
|
+
};
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
interface RegExpExecArray {
|
|
26
26
|
groups?: {
|
|
27
|
-
[key: string]: string
|
|
28
|
-
}
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
interface RegExp {
|
|
@@ -34,4 +34,4 @@ interface RegExp {
|
|
|
34
34
|
* Default is false. Read-only.
|
|
35
35
|
*/
|
|
36
36
|
readonly dotAll: boolean;
|
|
37
|
-
}
|
|
37
|
+
}
|
|
@@ -17,14 +17,12 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
type FlatArray<Arr, Depth extends number> = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
: Arr
|
|
20
|
+
done: Arr;
|
|
21
|
+
recur: Arr extends ReadonlyArray<infer InnerArr> ? FlatArray<InnerArr, [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]>
|
|
22
|
+
: Arr;
|
|
24
23
|
}[Depth extends -1 ? "done" : "recur"];
|
|
25
24
|
|
|
26
25
|
interface ReadonlyArray<T> {
|
|
27
|
-
|
|
28
26
|
/**
|
|
29
27
|
* Calls a defined callback function on each element of an array. Then, flattens the result into
|
|
30
28
|
* a new array.
|
|
@@ -35,11 +33,10 @@ interface ReadonlyArray<T> {
|
|
|
35
33
|
* @param thisArg An object to which the this keyword can refer in the callback function. If
|
|
36
34
|
* thisArg is omitted, undefined is used as the this value.
|
|
37
35
|
*/
|
|
38
|
-
flatMap<U, This = undefined>
|
|
36
|
+
flatMap<U, This = undefined>(
|
|
39
37
|
callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>,
|
|
40
|
-
thisArg?: This
|
|
41
|
-
): U[]
|
|
42
|
-
|
|
38
|
+
thisArg?: This,
|
|
39
|
+
): U[];
|
|
43
40
|
|
|
44
41
|
/**
|
|
45
42
|
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
|
@@ -49,12 +46,11 @@ interface ReadonlyArray<T> {
|
|
|
49
46
|
*/
|
|
50
47
|
flat<A, D extends number = 1>(
|
|
51
48
|
this: A,
|
|
52
|
-
depth?: D
|
|
53
|
-
): FlatArray<A, D>[]
|
|
54
|
-
|
|
49
|
+
depth?: D,
|
|
50
|
+
): FlatArray<A, D>[];
|
|
51
|
+
}
|
|
55
52
|
|
|
56
53
|
interface Array<T> {
|
|
57
|
-
|
|
58
54
|
/**
|
|
59
55
|
* Calls a defined callback function on each element of an array. Then, flattens the result into
|
|
60
56
|
* a new array.
|
|
@@ -65,10 +61,10 @@ interface Array<T> {
|
|
|
65
61
|
* @param thisArg An object to which the this keyword can refer in the callback function. If
|
|
66
62
|
* thisArg is omitted, undefined is used as the this value.
|
|
67
63
|
*/
|
|
68
|
-
flatMap<U, This = undefined>
|
|
64
|
+
flatMap<U, This = undefined>(
|
|
69
65
|
callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>,
|
|
70
|
-
thisArg?: This
|
|
71
|
-
): U[]
|
|
66
|
+
thisArg?: This,
|
|
67
|
+
): U[];
|
|
72
68
|
|
|
73
69
|
/**
|
|
74
70
|
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
|
@@ -78,6 +74,6 @@ interface Array<T> {
|
|
|
78
74
|
*/
|
|
79
75
|
flat<A, D extends number = 1>(
|
|
80
76
|
this: A,
|
|
81
|
-
depth?: D
|
|
82
|
-
): FlatArray<A, D>[]
|
|
77
|
+
depth?: D,
|
|
78
|
+
): FlatArray<A, D>[];
|
|
83
79
|
}
|
package/lib/lib.es2019.intl.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ interface ObjectConstructor {
|
|
|
23
23
|
* Returns an object created by key-value entries for properties and methods
|
|
24
24
|
* @param entries An iterable object that contains key-value entries for properties and methods.
|
|
25
25
|
*/
|
|
26
|
-
fromEntries<T = any>(entries: Iterable<readonly [PropertyKey, T]>): { [k: string]: T };
|
|
26
|
+
fromEntries<T = any>(entries: Iterable<readonly [PropertyKey, T]>): { [k: string]: T; };
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Returns an object created by key-value entries for properties and methods
|
|
@@ -389,9 +389,9 @@ interface BigInt64Array {
|
|
|
389
389
|
|
|
390
390
|
interface BigInt64ArrayConstructor {
|
|
391
391
|
readonly prototype: BigInt64Array;
|
|
392
|
-
new(length?: number): BigInt64Array;
|
|
393
|
-
new(array: Iterable<bigint>): BigInt64Array;
|
|
394
|
-
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array;
|
|
392
|
+
new (length?: number): BigInt64Array;
|
|
393
|
+
new (array: Iterable<bigint>): BigInt64Array;
|
|
394
|
+
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array;
|
|
395
395
|
|
|
396
396
|
/** The size in bytes of each element in the array. */
|
|
397
397
|
readonly BYTES_PER_ELEMENT: number;
|
|
@@ -661,9 +661,9 @@ interface BigUint64Array {
|
|
|
661
661
|
|
|
662
662
|
interface BigUint64ArrayConstructor {
|
|
663
663
|
readonly prototype: BigUint64Array;
|
|
664
|
-
new(length?: number): BigUint64Array;
|
|
665
|
-
new(array: Iterable<bigint>): BigUint64Array;
|
|
666
|
-
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array;
|
|
664
|
+
new (length?: number): BigUint64Array;
|
|
665
|
+
new (array: Iterable<bigint>): BigUint64Array;
|
|
666
|
+
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array;
|
|
667
667
|
|
|
668
668
|
/** The size in bytes of each element in the array. */
|
|
669
669
|
readonly BYTES_PER_ELEMENT: number;
|
|
@@ -720,7 +720,7 @@ interface DataView {
|
|
|
720
720
|
setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
|
|
721
721
|
}
|
|
722
722
|
|
|
723
|
-
declare namespace Intl{
|
|
723
|
+
declare namespace Intl {
|
|
724
724
|
interface NumberFormat {
|
|
725
725
|
format(value: number | bigint): string;
|
|
726
726
|
resolvedOptions(): ResolvedNumberFormatOptions;
|
package/lib/lib.es2020.date.d.ts
CHANGED
package/lib/lib.es2020.intl.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
/// <reference lib="es2018.intl" />
|
|
20
20
|
declare namespace Intl {
|
|
21
|
-
|
|
22
21
|
/**
|
|
23
22
|
* [Unicode BCP 47 Locale Identifiers](https://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers) definition.
|
|
24
23
|
*
|
|
@@ -58,7 +57,7 @@ declare namespace Intl {
|
|
|
58
57
|
*
|
|
59
58
|
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts).
|
|
60
59
|
*/
|
|
61
|
-
|
|
60
|
+
type RelativeTimeFormatUnitSingular =
|
|
62
61
|
| "year"
|
|
63
62
|
| "quarter"
|
|
64
63
|
| "month"
|
|
@@ -140,14 +139,14 @@ declare namespace Intl {
|
|
|
140
139
|
*/
|
|
141
140
|
type RelativeTimeFormatPart =
|
|
142
141
|
| {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
type: "literal";
|
|
143
|
+
value: string;
|
|
144
|
+
}
|
|
146
145
|
| {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
type: Exclude<NumberFormatPartTypes, "literal">;
|
|
147
|
+
value: string;
|
|
148
|
+
unit: RelativeTimeFormatUnitSingular;
|
|
149
|
+
};
|
|
151
150
|
|
|
152
151
|
interface RelativeTimeFormat {
|
|
153
152
|
/**
|
|
@@ -218,7 +217,7 @@ declare namespace Intl {
|
|
|
218
217
|
*
|
|
219
218
|
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat).
|
|
220
219
|
*/
|
|
221
|
-
new(
|
|
220
|
+
new (
|
|
222
221
|
locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
|
|
223
222
|
options?: RelativeTimeFormatOptions,
|
|
224
223
|
): RelativeTimeFormat;
|
|
@@ -410,7 +409,7 @@ declare namespace Intl {
|
|
|
410
409
|
*
|
|
411
410
|
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames).
|
|
412
411
|
*/
|
|
413
|
-
new(locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames;
|
|
412
|
+
new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames;
|
|
414
413
|
|
|
415
414
|
/**
|
|
416
415
|
* Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale.
|
|
@@ -425,7 +424,6 @@ declare namespace Intl {
|
|
|
425
424
|
*
|
|
426
425
|
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf).
|
|
427
426
|
*/
|
|
428
|
-
supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher }): BCP47LanguageTag[];
|
|
427
|
+
supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): BCP47LanguageTag[];
|
|
429
428
|
};
|
|
430
|
-
|
|
431
429
|
}
|
|
@@ -35,7 +35,7 @@ interface PromiseConstructor {
|
|
|
35
35
|
* @param values An array of Promises.
|
|
36
36
|
* @returns A new Promise.
|
|
37
37
|
*/
|
|
38
|
-
allSettled<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]
|
|
38
|
+
allSettled<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Creates a Promise that is resolved with an array of results when all
|
package/lib/lib.es2021.intl.d.ts
CHANGED
|
@@ -17,10 +17,9 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
declare namespace Intl {
|
|
20
|
-
|
|
21
20
|
interface DateTimeFormatPartTypesRegistry {
|
|
22
|
-
fractionalSecond: any
|
|
23
|
-
|
|
21
|
+
fractionalSecond: any;
|
|
22
|
+
}
|
|
24
23
|
|
|
25
24
|
interface DateTimeFormatOptions {
|
|
26
25
|
formatMatcher?: "basic" | "best fit" | "best fit" | undefined;
|
|
@@ -31,7 +30,7 @@ declare namespace Intl {
|
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
interface DateTimeRangeFormatPart extends DateTimeFormatPart {
|
|
34
|
-
source: "startRange" | "endRange" | "shared"
|
|
33
|
+
source: "startRange" | "endRange" | "shared";
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
interface DateTimeFormat {
|
|
@@ -114,7 +113,7 @@ declare namespace Intl {
|
|
|
114
113
|
*
|
|
115
114
|
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts).
|
|
116
115
|
*/
|
|
117
|
-
formatToParts(list: Iterable<string>): { type: "element" | "literal"
|
|
116
|
+
formatToParts(list: Iterable<string>): { type: "element" | "literal"; value: string; }[];
|
|
118
117
|
|
|
119
118
|
/**
|
|
120
119
|
* Returns a new object with properties reflecting the locale and style
|
|
@@ -144,7 +143,7 @@ declare namespace Intl {
|
|
|
144
143
|
*
|
|
145
144
|
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat).
|
|
146
145
|
*/
|
|
147
|
-
new(locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: ListFormatOptions): ListFormat;
|
|
146
|
+
new (locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: ListFormatOptions): ListFormat;
|
|
148
147
|
|
|
149
148
|
/**
|
|
150
149
|
* Returns an array containing those of the provided locales that are
|
|
@@ -17,11 +17,11 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
interface AggregateError extends Error {
|
|
20
|
-
errors: any[]
|
|
20
|
+
errors: any[];
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
interface AggregateErrorConstructor {
|
|
24
|
-
new(errors: Iterable<any>, message?: string): AggregateError;
|
|
24
|
+
new (errors: Iterable<any>, message?: string): AggregateError;
|
|
25
25
|
(errors: Iterable<any>, message?: string): AggregateError;
|
|
26
26
|
readonly prototype: AggregateError;
|
|
27
27
|
}
|
|
@@ -44,5 +44,5 @@ interface PromiseConstructor {
|
|
|
44
44
|
* @param values An array or iterable of Promises.
|
|
45
45
|
* @returns A new Promise.
|
|
46
46
|
*/
|
|
47
|
-
any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T
|
|
47
|
+
any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
|
|
48
48
|
}
|
|
@@ -35,7 +35,7 @@ interface WeakRefConstructor {
|
|
|
35
35
|
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
|
|
36
36
|
* @param target The target value for the WeakRef instance.
|
|
37
37
|
*/
|
|
38
|
-
new<T extends WeakKey>(target: T): WeakRef<T>;
|
|
38
|
+
new <T extends WeakKey>(target: T): WeakRef<T>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
declare var WeakRef: WeakRefConstructor;
|
|
@@ -70,7 +70,7 @@ interface FinalizationRegistryConstructor {
|
|
|
70
70
|
* Creates a finalization registry with an associated cleanup callback
|
|
71
71
|
* @param cleanupCallback The callback to call after a value in the registry has been reclaimed.
|
|
72
72
|
*/
|
|
73
|
-
new<T>(cleanupCallback: (heldValue: T) => void): FinalizationRegistry<T>;
|
|
73
|
+
new <T>(cleanupCallback: (heldValue: T) => void): FinalizationRegistry<T>;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
declare var FinalizationRegistry: FinalizationRegistryConstructor;
|
|
@@ -63,11 +63,11 @@ interface AggregateErrorConstructor {
|
|
|
63
63
|
new (
|
|
64
64
|
errors: Iterable<any>,
|
|
65
65
|
message?: string,
|
|
66
|
-
options?: ErrorOptions
|
|
66
|
+
options?: ErrorOptions,
|
|
67
67
|
): AggregateError;
|
|
68
68
|
(
|
|
69
69
|
errors: Iterable<any>,
|
|
70
70
|
message?: string,
|
|
71
|
-
options?: ErrorOptions
|
|
71
|
+
options?: ErrorOptions,
|
|
72
72
|
): AggregateError;
|
|
73
73
|
}
|
package/lib/lib.es2022.intl.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
declare namespace Intl {
|
|
20
|
-
|
|
21
20
|
/**
|
|
22
21
|
* An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter.
|
|
23
22
|
*
|
|
@@ -90,7 +89,7 @@ declare namespace Intl {
|
|
|
90
89
|
*
|
|
91
90
|
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter).
|
|
92
91
|
*/
|
|
93
|
-
new(locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: SegmenterOptions): Segmenter;
|
|
92
|
+
new (locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: SegmenterOptions): Segmenter;
|
|
94
93
|
|
|
95
94
|
/**
|
|
96
95
|
* Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
|
|
@@ -25,7 +25,7 @@ interface Atomics {
|
|
|
25
25
|
* @param value The expected value to test.
|
|
26
26
|
* @param [timeout] The expected value to test.
|
|
27
27
|
*/
|
|
28
|
-
waitAsync(typedArray: Int32Array, index: number, value: number, timeout?: number): { async: false
|
|
28
|
+
waitAsync(typedArray: Int32Array, index: number, value: number, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; };
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* A non-blocking, asynchronous version of wait which is usable on the main thread.
|
|
@@ -35,5 +35,5 @@ interface Atomics {
|
|
|
35
35
|
* @param value The expected value to test.
|
|
36
36
|
* @param [timeout] The expected value to test.
|
|
37
37
|
*/
|
|
38
|
-
waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false
|
|
38
|
+
waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; };
|
|
39
39
|
}
|