@typescript/native-preview-darwin-arm64 7.0.0-dev.20250522.2
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/LICENSE +55 -0
- package/NOTICE.txt +297 -0
- package/README.md +3 -0
- package/lib/lib.d.ts +22 -0
- package/lib/lib.decorators.d.ts +386 -0
- package/lib/lib.decorators.legacy.d.ts +22 -0
- package/lib/lib.dom.asynciterable.d.ts +41 -0
- package/lib/lib.dom.d.ts +28087 -0
- package/lib/lib.dom.iterable.d.ts +491 -0
- package/lib/lib.es2015.collection.d.ts +147 -0
- package/lib/lib.es2015.core.d.ts +597 -0
- package/lib/lib.es2015.d.ts +28 -0
- package/lib/lib.es2015.generator.d.ts +77 -0
- package/lib/lib.es2015.iterable.d.ts +590 -0
- package/lib/lib.es2015.promise.d.ts +81 -0
- package/lib/lib.es2015.proxy.d.ts +128 -0
- package/lib/lib.es2015.reflect.d.ts +144 -0
- package/lib/lib.es2015.symbol.d.ts +46 -0
- package/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- package/lib/lib.es2016.array.include.d.ts +116 -0
- package/lib/lib.es2016.d.ts +21 -0
- package/lib/lib.es2016.full.d.ts +23 -0
- package/lib/lib.es2016.intl.d.ts +31 -0
- package/lib/lib.es2017.arraybuffer.d.ts +21 -0
- package/lib/lib.es2017.d.ts +26 -0
- package/lib/lib.es2017.date.d.ts +31 -0
- package/lib/lib.es2017.full.d.ts +23 -0
- package/lib/lib.es2017.intl.d.ts +44 -0
- package/lib/lib.es2017.object.d.ts +49 -0
- package/lib/lib.es2017.sharedmemory.d.ts +135 -0
- package/lib/lib.es2017.string.d.ts +45 -0
- package/lib/lib.es2017.typedarrays.d.ts +53 -0
- package/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- package/lib/lib.es2018.asynciterable.d.ts +53 -0
- package/lib/lib.es2018.d.ts +24 -0
- package/lib/lib.es2018.full.d.ts +24 -0
- package/lib/lib.es2018.intl.d.ts +83 -0
- package/lib/lib.es2018.promise.d.ts +30 -0
- package/lib/lib.es2018.regexp.d.ts +37 -0
- package/lib/lib.es2019.array.d.ts +79 -0
- package/lib/lib.es2019.d.ts +24 -0
- package/lib/lib.es2019.full.d.ts +24 -0
- package/lib/lib.es2019.intl.d.ts +23 -0
- package/lib/lib.es2019.object.d.ts +33 -0
- package/lib/lib.es2019.string.d.ts +37 -0
- package/lib/lib.es2019.symbol.d.ts +24 -0
- package/lib/lib.es2020.bigint.d.ts +729 -0
- package/lib/lib.es2020.d.ts +27 -0
- package/lib/lib.es2020.date.d.ts +42 -0
- package/lib/lib.es2020.full.d.ts +24 -0
- package/lib/lib.es2020.intl.d.ts +474 -0
- package/lib/lib.es2020.number.d.ts +28 -0
- package/lib/lib.es2020.promise.d.ts +47 -0
- package/lib/lib.es2020.sharedmemory.d.ts +99 -0
- package/lib/lib.es2020.string.d.ts +44 -0
- package/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- package/lib/lib.es2021.d.ts +23 -0
- package/lib/lib.es2021.full.d.ts +24 -0
- package/lib/lib.es2021.intl.d.ts +166 -0
- package/lib/lib.es2021.promise.d.ts +48 -0
- package/lib/lib.es2021.string.d.ts +33 -0
- package/lib/lib.es2021.weakref.d.ts +78 -0
- package/lib/lib.es2022.array.d.ts +121 -0
- package/lib/lib.es2022.d.ts +25 -0
- package/lib/lib.es2022.error.d.ts +75 -0
- package/lib/lib.es2022.full.d.ts +24 -0
- package/lib/lib.es2022.intl.d.ts +121 -0
- package/lib/lib.es2022.object.d.ts +26 -0
- package/lib/lib.es2022.regexp.d.ts +39 -0
- package/lib/lib.es2022.string.d.ts +25 -0
- package/lib/lib.es2023.array.d.ts +924 -0
- package/lib/lib.es2023.collection.d.ts +21 -0
- package/lib/lib.es2023.d.ts +22 -0
- package/lib/lib.es2023.full.d.ts +24 -0
- package/lib/lib.es2023.intl.d.ts +56 -0
- package/lib/lib.es2024.arraybuffer.d.ts +65 -0
- package/lib/lib.es2024.collection.d.ts +29 -0
- package/lib/lib.es2024.d.ts +26 -0
- package/lib/lib.es2024.full.d.ts +24 -0
- package/lib/lib.es2024.object.d.ts +29 -0
- package/lib/lib.es2024.promise.d.ts +35 -0
- package/lib/lib.es2024.regexp.d.ts +25 -0
- package/lib/lib.es2024.sharedmemory.d.ts +68 -0
- package/lib/lib.es2024.string.d.ts +29 -0
- package/lib/lib.es5.d.ts +4585 -0
- package/lib/lib.es6.d.ts +23 -0
- package/lib/lib.esnext.array.d.ts +35 -0
- package/lib/lib.esnext.collection.d.ts +96 -0
- package/lib/lib.esnext.d.ts +25 -0
- package/lib/lib.esnext.decorators.d.ts +28 -0
- package/lib/lib.esnext.disposable.d.ts +193 -0
- package/lib/lib.esnext.full.d.ts +24 -0
- package/lib/lib.esnext.intl.d.ts +21 -0
- package/lib/lib.esnext.iterator.d.ts +148 -0
- package/lib/lib.scripthost.d.ts +322 -0
- package/lib/lib.webworker.asynciterable.d.ts +41 -0
- package/lib/lib.webworker.d.ts +9410 -0
- package/lib/lib.webworker.importscripts.d.ts +23 -0
- package/lib/lib.webworker.iterable.d.ts +288 -0
- package/lib/tsgo +0 -0
- package/package.json +41 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
/// <reference lib="es2020.bigint" />
|
|
20
|
+
|
|
21
|
+
interface Atomics {
|
|
22
|
+
/**
|
|
23
|
+
* Adds a value to the value at the given position in the array, returning the original value.
|
|
24
|
+
* Until this atomic operation completes, any other read or write operation against the array
|
|
25
|
+
* will block.
|
|
26
|
+
*/
|
|
27
|
+
add(typedArray: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Stores the bitwise AND of a value with the value at the given position in the array,
|
|
31
|
+
* returning the original value. Until this atomic operation completes, any other read or
|
|
32
|
+
* write operation against the array will block.
|
|
33
|
+
*/
|
|
34
|
+
and(typedArray: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Replaces the value at the given position in the array if the original value equals the given
|
|
38
|
+
* expected value, returning the original value. Until this atomic operation completes, any
|
|
39
|
+
* other read or write operation against the array will block.
|
|
40
|
+
*/
|
|
41
|
+
compareExchange(typedArray: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, expectedValue: bigint, replacementValue: bigint): bigint;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Replaces the value at the given position in the array, returning the original value. Until
|
|
45
|
+
* this atomic operation completes, any other read or write operation against the array will
|
|
46
|
+
* block.
|
|
47
|
+
*/
|
|
48
|
+
exchange(typedArray: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Returns the value at the given position in the array. Until this atomic operation completes,
|
|
52
|
+
* any other read or write operation against the array will block.
|
|
53
|
+
*/
|
|
54
|
+
load(typedArray: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number): bigint;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Stores the bitwise OR of a value with the value at the given position in the array,
|
|
58
|
+
* returning the original value. Until this atomic operation completes, any other read or write
|
|
59
|
+
* operation against the array will block.
|
|
60
|
+
*/
|
|
61
|
+
or(typedArray: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Stores a value at the given position in the array, returning the new value. Until this
|
|
65
|
+
* atomic operation completes, any other read or write operation against the array will block.
|
|
66
|
+
*/
|
|
67
|
+
store(typedArray: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Subtracts a value from the value at the given position in the array, returning the original
|
|
71
|
+
* value. Until this atomic operation completes, any other read or write operation against the
|
|
72
|
+
* array will block.
|
|
73
|
+
*/
|
|
74
|
+
sub(typedArray: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* If the value at the given position in the array is equal to the provided value, the current
|
|
78
|
+
* agent is put to sleep causing execution to suspend until the timeout expires (returning
|
|
79
|
+
* `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns
|
|
80
|
+
* `"not-equal"`.
|
|
81
|
+
*/
|
|
82
|
+
wait(typedArray: BigInt64Array<ArrayBufferLike>, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out";
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Wakes up sleeping agents that are waiting on the given index of the array, returning the
|
|
86
|
+
* number of agents that were awoken.
|
|
87
|
+
* @param typedArray A shared BigInt64Array.
|
|
88
|
+
* @param index The position in the typedArray to wake up on.
|
|
89
|
+
* @param count The number of sleeping agents to notify. Defaults to +Infinity.
|
|
90
|
+
*/
|
|
91
|
+
notify(typedArray: BigInt64Array<ArrayBufferLike>, index: number, count?: number): number;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Stores the bitwise XOR of a value with the value at the given position in the array,
|
|
95
|
+
* returning the original value. Until this atomic operation completes, any other read or write
|
|
96
|
+
* operation against the array will block.
|
|
97
|
+
*/
|
|
98
|
+
xor(typedArray: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
99
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
/// <reference lib="es2015.iterable" />
|
|
20
|
+
/// <reference lib="es2020.intl" />
|
|
21
|
+
/// <reference lib="es2020.symbol.wellknown" />
|
|
22
|
+
|
|
23
|
+
interface String {
|
|
24
|
+
/**
|
|
25
|
+
* Matches a string with a regular expression, and returns an iterable of matches
|
|
26
|
+
* containing the results of that search.
|
|
27
|
+
* @param regexp A variable name or string literal containing the regular expression pattern and flags.
|
|
28
|
+
*/
|
|
29
|
+
matchAll(regexp: RegExp): RegExpStringIterator<RegExpExecArray>;
|
|
30
|
+
|
|
31
|
+
/** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
|
|
32
|
+
toLocaleLowerCase(locales?: Intl.LocalesArgument): string;
|
|
33
|
+
|
|
34
|
+
/** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
|
|
35
|
+
toLocaleUpperCase(locales?: Intl.LocalesArgument): string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Determines whether two strings are equivalent in the current or specified locale.
|
|
39
|
+
* @param that String to compare to target string
|
|
40
|
+
* @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
|
|
41
|
+
* @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
|
|
42
|
+
*/
|
|
43
|
+
localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number;
|
|
44
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
/// <reference lib="es2015.iterable" />
|
|
20
|
+
/// <reference lib="es2015.symbol" />
|
|
21
|
+
|
|
22
|
+
interface SymbolConstructor {
|
|
23
|
+
/**
|
|
24
|
+
* A regular expression method that matches the regular expression against a string. Called
|
|
25
|
+
* by the String.prototype.matchAll method.
|
|
26
|
+
*/
|
|
27
|
+
readonly matchAll: unique symbol;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface RegExpStringIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
31
|
+
[Symbol.iterator](): RegExpStringIterator<T>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface RegExp {
|
|
35
|
+
/**
|
|
36
|
+
* Matches a string with this regular expression, and returns an iterable of matches
|
|
37
|
+
* containing the results of that search.
|
|
38
|
+
* @param string A string to search within.
|
|
39
|
+
*/
|
|
40
|
+
[Symbol.matchAll](str: string): RegExpStringIterator<RegExpMatchArray>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
/// <reference lib="es2020" />
|
|
20
|
+
/// <reference lib="es2021.promise" />
|
|
21
|
+
/// <reference lib="es2021.string" />
|
|
22
|
+
/// <reference lib="es2021.weakref" />
|
|
23
|
+
/// <reference lib="es2021.intl" />
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
/// <reference lib="es2021" />
|
|
20
|
+
/// <reference lib="dom" />
|
|
21
|
+
/// <reference lib="webworker.importscripts" />
|
|
22
|
+
/// <reference lib="scripthost" />
|
|
23
|
+
/// <reference lib="dom.iterable" />
|
|
24
|
+
/// <reference lib="dom.asynciterable" />
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
declare namespace Intl {
|
|
20
|
+
interface DateTimeFormatPartTypesRegistry {
|
|
21
|
+
fractionalSecond: any;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface DateTimeFormatOptions {
|
|
25
|
+
formatMatcher?: "basic" | "best fit" | "best fit" | undefined;
|
|
26
|
+
dateStyle?: "full" | "long" | "medium" | "short" | undefined;
|
|
27
|
+
timeStyle?: "full" | "long" | "medium" | "short" | undefined;
|
|
28
|
+
dayPeriod?: "narrow" | "short" | "long" | undefined;
|
|
29
|
+
fractionalSecondDigits?: 1 | 2 | 3 | undefined;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface DateTimeRangeFormatPart extends DateTimeFormatPart {
|
|
33
|
+
source: "startRange" | "endRange" | "shared";
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface DateTimeFormat {
|
|
37
|
+
formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string;
|
|
38
|
+
formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface ResolvedDateTimeFormatOptions {
|
|
42
|
+
formatMatcher?: "basic" | "best fit" | "best fit";
|
|
43
|
+
dateStyle?: "full" | "long" | "medium" | "short";
|
|
44
|
+
timeStyle?: "full" | "long" | "medium" | "short";
|
|
45
|
+
hourCycle?: "h11" | "h12" | "h23" | "h24";
|
|
46
|
+
dayPeriod?: "narrow" | "short" | "long";
|
|
47
|
+
fractionalSecondDigits?: 1 | 2 | 3;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The locale matching algorithm to use.
|
|
52
|
+
*
|
|
53
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
54
|
+
*/
|
|
55
|
+
type ListFormatLocaleMatcher = "lookup" | "best fit";
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The format of output message.
|
|
59
|
+
*
|
|
60
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
61
|
+
*/
|
|
62
|
+
type ListFormatType = "conjunction" | "disjunction" | "unit";
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The length of the formatted message.
|
|
66
|
+
*
|
|
67
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
68
|
+
*/
|
|
69
|
+
type ListFormatStyle = "long" | "short" | "narrow";
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter.
|
|
73
|
+
*
|
|
74
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
75
|
+
*/
|
|
76
|
+
interface ListFormatOptions {
|
|
77
|
+
/** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */
|
|
78
|
+
localeMatcher?: ListFormatLocaleMatcher | undefined;
|
|
79
|
+
/** The format of output message. */
|
|
80
|
+
type?: ListFormatType | undefined;
|
|
81
|
+
/** The length of the internationalized message. */
|
|
82
|
+
style?: ListFormatStyle | undefined;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface ResolvedListFormatOptions {
|
|
86
|
+
locale: string;
|
|
87
|
+
style: ListFormatStyle;
|
|
88
|
+
type: ListFormatType;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface ListFormat {
|
|
92
|
+
/**
|
|
93
|
+
* Returns a string with a language-specific representation of the list.
|
|
94
|
+
*
|
|
95
|
+
* @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array).
|
|
96
|
+
*
|
|
97
|
+
* @throws `TypeError` if `list` includes something other than the possible values.
|
|
98
|
+
*
|
|
99
|
+
* @returns {string} A language-specific formatted string representing the elements of the list.
|
|
100
|
+
*
|
|
101
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format).
|
|
102
|
+
*/
|
|
103
|
+
format(list: Iterable<string>): string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion.
|
|
107
|
+
*
|
|
108
|
+
* @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale.
|
|
109
|
+
*
|
|
110
|
+
* @throws `TypeError` if `list` includes something other than the possible values.
|
|
111
|
+
*
|
|
112
|
+
* @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list.
|
|
113
|
+
*
|
|
114
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts).
|
|
115
|
+
*/
|
|
116
|
+
formatToParts(list: Iterable<string>): { type: "element" | "literal"; value: string; }[];
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Returns a new object with properties reflecting the locale and style
|
|
120
|
+
* formatting options computed during the construction of the current
|
|
121
|
+
* `Intl.ListFormat` object.
|
|
122
|
+
*
|
|
123
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions).
|
|
124
|
+
*/
|
|
125
|
+
resolvedOptions(): ResolvedListFormatOptions;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const ListFormat: {
|
|
129
|
+
prototype: ListFormat;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that
|
|
133
|
+
* enable language-sensitive list formatting.
|
|
134
|
+
*
|
|
135
|
+
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
136
|
+
* For the general form and interpretation of the `locales` argument,
|
|
137
|
+
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
138
|
+
*
|
|
139
|
+
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters)
|
|
140
|
+
* with some or all options of `ListFormatOptions`.
|
|
141
|
+
*
|
|
142
|
+
* @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object.
|
|
143
|
+
*
|
|
144
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat).
|
|
145
|
+
*/
|
|
146
|
+
new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Returns an array containing those of the provided locales that are
|
|
150
|
+
* supported in list formatting without having to fall back to the runtime's default locale.
|
|
151
|
+
*
|
|
152
|
+
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
153
|
+
* For the general form and interpretation of the `locales` argument,
|
|
154
|
+
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
155
|
+
*
|
|
156
|
+
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters).
|
|
157
|
+
* with some or all possible options.
|
|
158
|
+
*
|
|
159
|
+
* @returns An array of strings representing a subset of the given locale tags that are supported in list
|
|
160
|
+
* formatting without having to fall back to the runtime's default locale.
|
|
161
|
+
*
|
|
162
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf).
|
|
163
|
+
*/
|
|
164
|
+
supportedLocalesOf(locales: LocalesArgument, options?: Pick<ListFormatOptions, "localeMatcher">): UnicodeBCP47LocaleIdentifier[];
|
|
165
|
+
};
|
|
166
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
interface AggregateError extends Error {
|
|
20
|
+
errors: any[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface AggregateErrorConstructor {
|
|
24
|
+
new (errors: Iterable<any>, message?: string): AggregateError;
|
|
25
|
+
(errors: Iterable<any>, message?: string): AggregateError;
|
|
26
|
+
readonly prototype: AggregateError;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare var AggregateError: AggregateErrorConstructor;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Represents the completion of an asynchronous operation
|
|
33
|
+
*/
|
|
34
|
+
interface PromiseConstructor {
|
|
35
|
+
/**
|
|
36
|
+
* The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
|
|
37
|
+
* @param values An array or iterable of Promises.
|
|
38
|
+
* @returns A new Promise.
|
|
39
|
+
*/
|
|
40
|
+
any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
|
|
44
|
+
* @param values An array or iterable of Promises.
|
|
45
|
+
* @returns A new Promise.
|
|
46
|
+
*/
|
|
47
|
+
any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
interface String {
|
|
20
|
+
/**
|
|
21
|
+
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
22
|
+
* @param searchValue A string to search for.
|
|
23
|
+
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
|
|
24
|
+
*/
|
|
25
|
+
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
29
|
+
* @param searchValue A string to search for.
|
|
30
|
+
* @param replacer A function that returns the replacement text.
|
|
31
|
+
*/
|
|
32
|
+
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
/// <reference lib="es2015.symbol.wellknown" />
|
|
20
|
+
|
|
21
|
+
interface WeakRef<T extends WeakKey> {
|
|
22
|
+
readonly [Symbol.toStringTag]: "WeakRef";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns the WeakRef instance's target value, or undefined if the target value has been
|
|
26
|
+
* reclaimed.
|
|
27
|
+
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
|
|
28
|
+
*/
|
|
29
|
+
deref(): T | undefined;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface WeakRefConstructor {
|
|
33
|
+
readonly prototype: WeakRef<any>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Creates a WeakRef instance for the given target value.
|
|
37
|
+
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
|
|
38
|
+
* @param target The target value for the WeakRef instance.
|
|
39
|
+
*/
|
|
40
|
+
new <T extends WeakKey>(target: T): WeakRef<T>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare var WeakRef: WeakRefConstructor;
|
|
44
|
+
|
|
45
|
+
interface FinalizationRegistry<T> {
|
|
46
|
+
readonly [Symbol.toStringTag]: "FinalizationRegistry";
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Registers a value with the registry.
|
|
50
|
+
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
|
|
51
|
+
* @param target The target value to register.
|
|
52
|
+
* @param heldValue The value to pass to the finalizer for this value. This cannot be the
|
|
53
|
+
* target value.
|
|
54
|
+
* @param unregisterToken The token to pass to the unregister method to unregister the target
|
|
55
|
+
* value. If not provided, the target cannot be unregistered.
|
|
56
|
+
*/
|
|
57
|
+
register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Unregisters a value from the registry.
|
|
61
|
+
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
|
|
62
|
+
* @param unregisterToken The token that was used as the unregisterToken argument when calling
|
|
63
|
+
* register to register the target value.
|
|
64
|
+
*/
|
|
65
|
+
unregister(unregisterToken: WeakKey): boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
interface FinalizationRegistryConstructor {
|
|
69
|
+
readonly prototype: FinalizationRegistry<any>;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Creates a finalization registry with an associated cleanup callback
|
|
73
|
+
* @param cleanupCallback The callback to call after a value in the registry has been reclaimed.
|
|
74
|
+
*/
|
|
75
|
+
new <T>(cleanupCallback: (heldValue: T) => void): FinalizationRegistry<T>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare var FinalizationRegistry: FinalizationRegistryConstructor;
|