strict-ts-lib-v5.7 0.4.0
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/README.md +28 -0
- package/libs/decorators/index.d.ts +362 -0
- package/libs/decorators/legacy/index.d.ts +19 -0
- package/libs/dom/asynciterable/index.d.ts +41 -0
- package/libs/dom/index.d.ts +35994 -0
- package/libs/dom/iterable/index.d.ts +793 -0
- package/libs/es2015/collection/index.d.ts +148 -0
- package/libs/es2015/core/index.d.ts +647 -0
- package/libs/es2015/generator/index.d.ts +65 -0
- package/libs/es2015/index.d.ts +12 -0
- package/libs/es2015/iterable/index.d.ts +645 -0
- package/libs/es2015/promise/index.d.ts +74 -0
- package/libs/es2015/proxy/index.d.ts +131 -0
- package/libs/es2015/reflect/index.d.ts +145 -0
- package/libs/es2015/symbol/index.d.ts +30 -0
- package/libs/es2015/symbol-wellknown/index.d.ts +331 -0
- package/libs/es2016/array-include/index.d.ts +115 -0
- package/libs/es2016/full/index.d.ts +7 -0
- package/libs/es2016/index.d.ts +5 -0
- package/libs/es2016/intl/index.d.ts +15 -0
- package/libs/es2017/arraybuffer/index.d.ts +5 -0
- package/libs/es2017/date/index.d.ts +23 -0
- package/libs/es2017/full/index.d.ts +7 -0
- package/libs/es2017/index.d.ts +10 -0
- package/libs/es2017/intl/index.d.ts +28 -0
- package/libs/es2017/object/index.d.ts +115 -0
- package/libs/es2017/sharedmemory/index.d.ts +248 -0
- package/libs/es2017/string/index.d.ts +29 -0
- package/libs/es2017/typedarrays/index.d.ts +37 -0
- package/libs/es2018/asyncgenerator/index.d.ts +69 -0
- package/libs/es2018/asynciterable/index.d.ts +49 -0
- package/libs/es2018/full/index.d.ts +8 -0
- package/libs/es2018/index.d.ts +8 -0
- package/libs/es2018/intl/index.d.ts +92 -0
- package/libs/es2018/promise/index.d.ts +14 -0
- package/libs/es2018/regexp/index.d.ts +21 -0
- package/libs/es2019/array/index.d.ts +94 -0
- package/libs/es2019/full/index.d.ts +8 -0
- package/libs/es2019/index.d.ts +8 -0
- package/libs/es2019/intl/index.d.ts +7 -0
- package/libs/es2019/object/index.d.ts +143 -0
- package/libs/es2019/string/index.d.ts +21 -0
- package/libs/es2019/symbol/index.d.ts +8 -0
- package/libs/es2020/bigint/index.d.ts +904 -0
- package/libs/es2020/date/index.d.ts +35 -0
- package/libs/es2020/full/index.d.ts +8 -0
- package/libs/es2020/index.d.ts +11 -0
- package/libs/es2020/intl/index.d.ts +494 -0
- package/libs/es2020/number/index.d.ts +15 -0
- package/libs/es2020/promise/index.d.ts +37 -0
- package/libs/es2020/sharedmemory/index.d.ts +146 -0
- package/libs/es2020/string/index.d.ts +32 -0
- package/libs/es2020/symbol-wellknown/index.d.ts +29 -0
- package/libs/es2021/full/index.d.ts +8 -0
- package/libs/es2021/index.d.ts +7 -0
- package/libs/es2021/intl/index.d.ts +161 -0
- package/libs/es2021/promise/index.d.ts +34 -0
- package/libs/es2021/string/index.d.ts +20 -0
- package/libs/es2021/weakref/index.d.ts +62 -0
- package/libs/es2022/array/index.d.ts +105 -0
- package/libs/es2022/error/index.d.ts +59 -0
- package/libs/es2022/full/index.d.ts +8 -0
- package/libs/es2022/index.d.ts +9 -0
- package/libs/es2022/intl/index.d.ts +120 -0
- package/libs/es2022/object/index.d.ts +41 -0
- package/libs/es2022/regexp/index.d.ts +23 -0
- package/libs/es2022/string/index.d.ts +9 -0
- package/libs/es2023/array/index.d.ts +915 -0
- package/libs/es2023/collection/index.d.ts +5 -0
- package/libs/es2023/full/index.d.ts +8 -0
- package/libs/es2023/index.d.ts +6 -0
- package/libs/es2023/intl/index.d.ts +106 -0
- package/libs/es2024/arraybuffer/index.d.ts +52 -0
- package/libs/es2024/collection/index.d.ts +13 -0
- package/libs/es2024/full/index.d.ts +8 -0
- package/libs/es2024/index.d.ts +10 -0
- package/libs/es2024/object/index.d.ts +13 -0
- package/libs/es2024/promise/index.d.ts +19 -0
- package/libs/es2024/regexp/index.d.ts +9 -0
- package/libs/es2024/sharedmemory/index.d.ts +69 -0
- package/libs/es2024/string/index.d.ts +13 -0
- package/libs/es5/index.d.ts +5793 -0
- package/libs/es6/index.d.ts +7 -0
- package/libs/esnext/array/index.d.ts +28 -0
- package/libs/esnext/collection/index.d.ts +80 -0
- package/libs/esnext/decorators/index.d.ts +12 -0
- package/libs/esnext/disposable/index.d.ts +175 -0
- package/libs/esnext/full/index.d.ts +8 -0
- package/libs/esnext/index.d.ts +9 -0
- package/libs/esnext/intl/index.d.ts +5 -0
- package/libs/esnext/iterator/index.d.ts +172 -0
- package/libs/scripthost/index.d.ts +310 -0
- package/libs/webworker/asynciterable/index.d.ts +41 -0
- package/libs/webworker/importscripts/index.d.ts +7 -0
- package/libs/webworker/index.d.ts +12079 -0
- package/libs/webworker/iterable/index.d.ts +578 -0
- package/package.json +23 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
/// <reference lib="es2015.symbol" />
|
|
4
|
+
/// <reference lib="es2015.symbol.wellknown" />
|
|
5
|
+
|
|
6
|
+
interface SharedArrayBuffer {
|
|
7
|
+
/**
|
|
8
|
+
* Read-only. The length of the ArrayBuffer (in bytes).
|
|
9
|
+
*/
|
|
10
|
+
readonly byteLength: number;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Returns a section of an SharedArrayBuffer.
|
|
14
|
+
*/
|
|
15
|
+
slice(begin?: number, end?: number): SharedArrayBuffer;
|
|
16
|
+
readonly [Symbol.species]: SharedArrayBuffer;
|
|
17
|
+
readonly [Symbol.toStringTag]: 'SharedArrayBuffer';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface SharedArrayBufferConstructor {
|
|
21
|
+
readonly prototype: SharedArrayBuffer;
|
|
22
|
+
new (byteLength?: number): SharedArrayBuffer;
|
|
23
|
+
}
|
|
24
|
+
declare const SharedArrayBuffer: SharedArrayBufferConstructor;
|
|
25
|
+
|
|
26
|
+
interface ArrayBufferTypes {
|
|
27
|
+
readonly SharedArrayBuffer: SharedArrayBuffer;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface Atomics {
|
|
31
|
+
/**
|
|
32
|
+
* Adds a value to the value at the given position in the array, returning the original value.
|
|
33
|
+
* Until this atomic operation completes, any other read or write operation against the array
|
|
34
|
+
* will block.
|
|
35
|
+
*/
|
|
36
|
+
add(
|
|
37
|
+
typedArray: Int8Array,
|
|
38
|
+
index: number,
|
|
39
|
+
value: import('ts-type-forge').Int8,
|
|
40
|
+
): import('ts-type-forge').Int8;
|
|
41
|
+
add(
|
|
42
|
+
typedArray: Uint8Array,
|
|
43
|
+
index: number,
|
|
44
|
+
value: import('ts-type-forge').Uint8,
|
|
45
|
+
): import('ts-type-forge').Uint8;
|
|
46
|
+
add(
|
|
47
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
48
|
+
index: number,
|
|
49
|
+
value: number,
|
|
50
|
+
): number;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Stores the bitwise AND of a value with the value at the given position in the array,
|
|
54
|
+
* returning the original value. Until this atomic operation completes, any other read or
|
|
55
|
+
* write operation against the array will block.
|
|
56
|
+
*/
|
|
57
|
+
and(
|
|
58
|
+
typedArray: Int8Array,
|
|
59
|
+
index: number,
|
|
60
|
+
value: import('ts-type-forge').Int8,
|
|
61
|
+
): import('ts-type-forge').Int8;
|
|
62
|
+
and(
|
|
63
|
+
typedArray: Uint8Array,
|
|
64
|
+
index: number,
|
|
65
|
+
value: import('ts-type-forge').Uint8,
|
|
66
|
+
): import('ts-type-forge').Uint8;
|
|
67
|
+
and(
|
|
68
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
69
|
+
index: number,
|
|
70
|
+
value: number,
|
|
71
|
+
): number;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Replaces the value at the given position in the array if the original value equals the given
|
|
75
|
+
* expected value, returning the original value. Until this atomic operation completes, any
|
|
76
|
+
* other read or write operation against the array will block.
|
|
77
|
+
*/
|
|
78
|
+
compareExchange(
|
|
79
|
+
typedArray: Int8Array,
|
|
80
|
+
index: number,
|
|
81
|
+
expectedValue: import('ts-type-forge').Int8,
|
|
82
|
+
replacementValue: import('ts-type-forge').Int8,
|
|
83
|
+
): import('ts-type-forge').Int8;
|
|
84
|
+
compareExchange(
|
|
85
|
+
typedArray: Uint8Array,
|
|
86
|
+
index: number,
|
|
87
|
+
expectedValue: import('ts-type-forge').Uint8,
|
|
88
|
+
replacementValue: import('ts-type-forge').Uint8,
|
|
89
|
+
): import('ts-type-forge').Uint8;
|
|
90
|
+
compareExchange(
|
|
91
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
92
|
+
index: number,
|
|
93
|
+
expectedValue: number,
|
|
94
|
+
replacementValue: number,
|
|
95
|
+
): number;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Replaces the value at the given position in the array, returning the original value. Until
|
|
99
|
+
* this atomic operation completes, any other read or write operation against the array will
|
|
100
|
+
* block.
|
|
101
|
+
*/
|
|
102
|
+
exchange(
|
|
103
|
+
typedArray: Int8Array,
|
|
104
|
+
index: number,
|
|
105
|
+
value: import('ts-type-forge').Int8,
|
|
106
|
+
): import('ts-type-forge').Int8;
|
|
107
|
+
exchange(
|
|
108
|
+
typedArray: Uint8Array,
|
|
109
|
+
index: number,
|
|
110
|
+
value: import('ts-type-forge').Uint8,
|
|
111
|
+
): import('ts-type-forge').Uint8;
|
|
112
|
+
exchange(
|
|
113
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
114
|
+
index: number,
|
|
115
|
+
value: number,
|
|
116
|
+
): number;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Returns a value indicating whether high-performance algorithms can use atomic operations
|
|
120
|
+
* (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed
|
|
121
|
+
* array.
|
|
122
|
+
*/
|
|
123
|
+
isLockFree(size: number): boolean;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Returns the value at the given position in the array. Until this atomic operation completes,
|
|
127
|
+
* any other read or write operation against the array will block.
|
|
128
|
+
*/
|
|
129
|
+
load(typedArray: Int8Array, index: number): import('ts-type-forge').Int8;
|
|
130
|
+
load(typedArray: Uint8Array, index: number): import('ts-type-forge').Uint8;
|
|
131
|
+
load(
|
|
132
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
133
|
+
index: number,
|
|
134
|
+
): number;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Stores the bitwise OR of a value with the value at the given position in the array,
|
|
138
|
+
* returning the original value. Until this atomic operation completes, any other read or write
|
|
139
|
+
* operation against the array will block.
|
|
140
|
+
*/
|
|
141
|
+
or(
|
|
142
|
+
typedArray: Int8Array,
|
|
143
|
+
index: number,
|
|
144
|
+
value: import('ts-type-forge').Int8,
|
|
145
|
+
): import('ts-type-forge').Int8;
|
|
146
|
+
or(
|
|
147
|
+
typedArray: Uint8Array,
|
|
148
|
+
index: number,
|
|
149
|
+
value: import('ts-type-forge').Uint8,
|
|
150
|
+
): import('ts-type-forge').Uint8;
|
|
151
|
+
or(
|
|
152
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
153
|
+
index: number,
|
|
154
|
+
value: number,
|
|
155
|
+
): number;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Stores a value at the given position in the array, returning the new value. Until this
|
|
159
|
+
* atomic operation completes, any other read or write operation against the array will block.
|
|
160
|
+
*/
|
|
161
|
+
store(
|
|
162
|
+
typedArray: Int8Array,
|
|
163
|
+
index: number,
|
|
164
|
+
value: import('ts-type-forge').Int8,
|
|
165
|
+
): import('ts-type-forge').Int8;
|
|
166
|
+
store(
|
|
167
|
+
typedArray: Uint8Array,
|
|
168
|
+
index: number,
|
|
169
|
+
value: import('ts-type-forge').Uint8,
|
|
170
|
+
): import('ts-type-forge').Uint8;
|
|
171
|
+
store(
|
|
172
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
173
|
+
index: number,
|
|
174
|
+
value: number,
|
|
175
|
+
): number;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Subtracts a value from the value at the given position in the array, returning the original
|
|
179
|
+
* value. Until this atomic operation completes, any other read or write operation against the
|
|
180
|
+
* array will block.
|
|
181
|
+
*/
|
|
182
|
+
sub(
|
|
183
|
+
typedArray: Int8Array,
|
|
184
|
+
index: number,
|
|
185
|
+
value: import('ts-type-forge').Int8,
|
|
186
|
+
): import('ts-type-forge').Int8;
|
|
187
|
+
sub(
|
|
188
|
+
typedArray: Uint8Array,
|
|
189
|
+
index: number,
|
|
190
|
+
value: import('ts-type-forge').Uint8,
|
|
191
|
+
): import('ts-type-forge').Uint8;
|
|
192
|
+
sub(
|
|
193
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
194
|
+
index: number,
|
|
195
|
+
value: number,
|
|
196
|
+
): number;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* If the value at the given position in the array is equal to the provided value, the current
|
|
200
|
+
* agent is put to sleep causing execution to suspend until the timeout expires (returning
|
|
201
|
+
* `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns
|
|
202
|
+
* `"not-equal"`.
|
|
203
|
+
*/
|
|
204
|
+
wait(
|
|
205
|
+
typedArray: Int32Array<ArrayBufferLike>,
|
|
206
|
+
index: number,
|
|
207
|
+
value: number,
|
|
208
|
+
timeout?: number,
|
|
209
|
+
): 'ok' | 'not-equal' | 'timed-out';
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Wakes up sleeping agents that are waiting on the given index of the array, returning the
|
|
213
|
+
* number of agents that were awoken.
|
|
214
|
+
* @param typedArray A shared Int32Array<ArrayBufferLike>.
|
|
215
|
+
* @param index The position in the typedArray to wake up on.
|
|
216
|
+
* @param count The number of sleeping agents to notify. Defaults to +Infinity.
|
|
217
|
+
*/
|
|
218
|
+
notify(
|
|
219
|
+
typedArray: Int32Array<ArrayBufferLike>,
|
|
220
|
+
index: number,
|
|
221
|
+
count?: number,
|
|
222
|
+
): number;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Stores the bitwise XOR of a value with the value at the given position in the array,
|
|
226
|
+
* returning the original value. Until this atomic operation completes, any other read or write
|
|
227
|
+
* operation against the array will block.
|
|
228
|
+
*/
|
|
229
|
+
xor(
|
|
230
|
+
typedArray: Int8Array,
|
|
231
|
+
index: number,
|
|
232
|
+
value: import('ts-type-forge').Int8,
|
|
233
|
+
): import('ts-type-forge').Int8;
|
|
234
|
+
xor(
|
|
235
|
+
typedArray: Uint8Array,
|
|
236
|
+
index: number,
|
|
237
|
+
value: import('ts-type-forge').Uint8,
|
|
238
|
+
): import('ts-type-forge').Uint8;
|
|
239
|
+
xor(
|
|
240
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
241
|
+
index: number,
|
|
242
|
+
value: number,
|
|
243
|
+
): number;
|
|
244
|
+
|
|
245
|
+
readonly [Symbol.toStringTag]: 'Atomics';
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
declare const Atomics: Atomics;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
interface String {
|
|
4
|
+
/**
|
|
5
|
+
* Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
|
|
6
|
+
* The padding is applied from the start (left) of the current string.
|
|
7
|
+
*
|
|
8
|
+
* @param maxLength The length of the resulting string once the current string has been padded.
|
|
9
|
+
* If this parameter is smaller than the current string's length, the current string will be returned as it is.
|
|
10
|
+
*
|
|
11
|
+
* @param fillString The string to pad the current string with.
|
|
12
|
+
* If this string is too long, it will be truncated and the left-most part will be applied.
|
|
13
|
+
* The default value for this parameter is " " (U+0020).
|
|
14
|
+
*/
|
|
15
|
+
padStart(maxLength: number, fillString?: string): string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
|
|
19
|
+
* The padding is applied from the end (right) of the current string.
|
|
20
|
+
*
|
|
21
|
+
* @param maxLength The length of the resulting string once the current string has been padded.
|
|
22
|
+
* If this parameter is smaller than the current string's length, the current string will be returned as it is.
|
|
23
|
+
*
|
|
24
|
+
* @param fillString The string to pad the current string with.
|
|
25
|
+
* If this string is too long, it will be truncated and the left-most part will be applied.
|
|
26
|
+
* The default value for this parameter is " " (U+0020).
|
|
27
|
+
*/
|
|
28
|
+
padEnd(maxLength: number, fillString?: string): string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
interface Int8ArrayConstructor {
|
|
4
|
+
new (): Int8Array<ArrayBuffer>;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface Uint8ArrayConstructor {
|
|
8
|
+
new (): Uint8Array<ArrayBuffer>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Uint8ClampedArrayConstructor {
|
|
12
|
+
new (): Uint8ClampedArray<ArrayBuffer>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface Int16ArrayConstructor {
|
|
16
|
+
new (): Int16Array<ArrayBuffer>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface Uint16ArrayConstructor {
|
|
20
|
+
new (): Uint16Array<ArrayBuffer>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface Int32ArrayConstructor {
|
|
24
|
+
new (): Int32Array<ArrayBuffer>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface Uint32ArrayConstructor {
|
|
28
|
+
new (): Uint32Array<ArrayBuffer>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface Float32ArrayConstructor {
|
|
32
|
+
new (): Float32Array<ArrayBuffer>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface Float64ArrayConstructor {
|
|
36
|
+
new (): Float64Array<ArrayBuffer>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
/// <reference lib="es2018.asynciterable" />
|
|
4
|
+
|
|
5
|
+
interface AsyncGenerator<
|
|
6
|
+
T = unknown,
|
|
7
|
+
TReturn = any,
|
|
8
|
+
TNext = unknown,
|
|
9
|
+
> extends AsyncIteratorObject<T, TReturn, TNext> {
|
|
10
|
+
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
|
11
|
+
next(
|
|
12
|
+
...[value]: readonly [] | readonly [TNext]
|
|
13
|
+
): Promise<IteratorResult<T, TReturn>>;
|
|
14
|
+
return(
|
|
15
|
+
value: TReturn | PromiseLike<TReturn>,
|
|
16
|
+
): Promise<IteratorResult<T, TReturn>>;
|
|
17
|
+
throw(e: unknown): Promise<IteratorResult<T, TReturn>>;
|
|
18
|
+
[Symbol.asyncIterator](): AsyncGenerator<T, TReturn, TNext>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface AsyncGeneratorFunction {
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new AsyncGenerator object.
|
|
24
|
+
* @param args A list of arguments the function accepts.
|
|
25
|
+
*/
|
|
26
|
+
new (...args: readonly unknown[]): AsyncGenerator;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a new AsyncGenerator object.
|
|
29
|
+
* @param args A list of arguments the function accepts.
|
|
30
|
+
*/
|
|
31
|
+
(...args: readonly unknown[]): AsyncGenerator;
|
|
32
|
+
/**
|
|
33
|
+
* The length of the arguments.
|
|
34
|
+
*/
|
|
35
|
+
readonly length: number;
|
|
36
|
+
/**
|
|
37
|
+
* Returns the name of the function.
|
|
38
|
+
*/
|
|
39
|
+
readonly name: string;
|
|
40
|
+
/**
|
|
41
|
+
* A reference to the prototype.
|
|
42
|
+
*/
|
|
43
|
+
readonly prototype: AsyncGenerator;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface AsyncGeneratorFunctionConstructor {
|
|
47
|
+
/**
|
|
48
|
+
* Creates a new AsyncGenerator function.
|
|
49
|
+
* @param args A list of arguments the function accepts.
|
|
50
|
+
*/
|
|
51
|
+
new (...args: readonly string[]): AsyncGeneratorFunction;
|
|
52
|
+
/**
|
|
53
|
+
* Creates a new AsyncGenerator function.
|
|
54
|
+
* @param args A list of arguments the function accepts.
|
|
55
|
+
*/
|
|
56
|
+
(...args: readonly string[]): AsyncGeneratorFunction;
|
|
57
|
+
/**
|
|
58
|
+
* The length of the arguments.
|
|
59
|
+
*/
|
|
60
|
+
readonly length: number;
|
|
61
|
+
/**
|
|
62
|
+
* Returns the name of the function.
|
|
63
|
+
*/
|
|
64
|
+
readonly name: string;
|
|
65
|
+
/**
|
|
66
|
+
* A reference to the prototype.
|
|
67
|
+
*/
|
|
68
|
+
readonly prototype: AsyncGeneratorFunction;
|
|
69
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
/// <reference lib="es2015.symbol" />
|
|
4
|
+
/// <reference lib="es2015.iterable" />
|
|
5
|
+
|
|
6
|
+
interface SymbolConstructor {
|
|
7
|
+
/**
|
|
8
|
+
* A method that returns the default async iterator for an object. Called by the semantics of
|
|
9
|
+
* the for-await-of statement.
|
|
10
|
+
*/
|
|
11
|
+
readonly asyncIterator: unique symbol;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface AsyncIterator<T, TReturn = any, TNext = unknown> {
|
|
15
|
+
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
|
16
|
+
next(
|
|
17
|
+
...[value]: readonly [] | readonly [TNext]
|
|
18
|
+
): Promise<IteratorResult<T, TReturn>>;
|
|
19
|
+
return?(
|
|
20
|
+
value?: TReturn | PromiseLike<TReturn>,
|
|
21
|
+
): Promise<IteratorResult<T, TReturn>>;
|
|
22
|
+
throw?(e?: unknown): Promise<IteratorResult<T, TReturn>>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface AsyncIterable<T, TReturn = any, TNext = unknown> {
|
|
26
|
+
[Symbol.asyncIterator](): AsyncIterator<T, TReturn, TNext>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Describes a user-defined {@link AsyncIterator} that is also async iterable.
|
|
31
|
+
*/
|
|
32
|
+
interface AsyncIterableIterator<
|
|
33
|
+
T,
|
|
34
|
+
TReturn = any,
|
|
35
|
+
TNext = unknown,
|
|
36
|
+
> extends AsyncIterator<T, TReturn, TNext> {
|
|
37
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<T, TReturn, TNext>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`.
|
|
42
|
+
*/
|
|
43
|
+
interface AsyncIteratorObject<
|
|
44
|
+
T,
|
|
45
|
+
TReturn = any,
|
|
46
|
+
TNext = unknown,
|
|
47
|
+
> extends AsyncIterator<T, TReturn, TNext> {
|
|
48
|
+
[Symbol.asyncIterator](): AsyncIteratorObject<T, TReturn, TNext>;
|
|
49
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
/// <reference lib="es2018" />
|
|
4
|
+
/// <reference lib="dom" />
|
|
5
|
+
/// <reference lib="webworker.importscripts" />
|
|
6
|
+
/// <reference lib="scripthost" />
|
|
7
|
+
/// <reference lib="dom.iterable" />
|
|
8
|
+
/// <reference lib="dom.asynciterable" />
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
/// <reference lib="es2017" />
|
|
4
|
+
/// <reference lib="es2018.asynciterable" />
|
|
5
|
+
/// <reference lib="es2018.asyncgenerator" />
|
|
6
|
+
/// <reference lib="es2018.promise" />
|
|
7
|
+
/// <reference lib="es2018.regexp" />
|
|
8
|
+
/// <reference lib="es2018.intl" />
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
declare namespace Intl {
|
|
4
|
+
// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories
|
|
5
|
+
type LDMLPluralRule = 'zero' | 'one' | 'two' | 'few' | 'many' | 'other';
|
|
6
|
+
type PluralRuleType = 'cardinal' | 'ordinal';
|
|
7
|
+
|
|
8
|
+
interface PluralRulesOptions {
|
|
9
|
+
readonly localeMatcher?: 'lookup' | 'best fit' | undefined;
|
|
10
|
+
readonly type?: PluralRuleType | undefined;
|
|
11
|
+
readonly minimumIntegerDigits?:
|
|
12
|
+
| import('ts-type-forge').UintRange<1, 22>
|
|
13
|
+
| undefined;
|
|
14
|
+
readonly minimumFractionDigits?:
|
|
15
|
+
| import('ts-type-forge').UintRange<0, 21>
|
|
16
|
+
| undefined;
|
|
17
|
+
readonly maximumFractionDigits?:
|
|
18
|
+
| import('ts-type-forge').UintRange<0, 21>
|
|
19
|
+
| undefined;
|
|
20
|
+
readonly minimumSignificantDigits?:
|
|
21
|
+
| import('ts-type-forge').UintRange<1, 22>
|
|
22
|
+
| undefined;
|
|
23
|
+
readonly maximumSignificantDigits?:
|
|
24
|
+
| import('ts-type-forge').UintRange<1, 22>
|
|
25
|
+
| undefined;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface ResolvedPluralRulesOptions {
|
|
29
|
+
readonly locale: string;
|
|
30
|
+
readonly pluralCategories: readonly LDMLPluralRule[];
|
|
31
|
+
readonly type: PluralRuleType;
|
|
32
|
+
readonly minimumIntegerDigits: import('ts-type-forge').UintRange<1, 22>;
|
|
33
|
+
readonly minimumFractionDigits: import('ts-type-forge').UintRange<0, 21>;
|
|
34
|
+
readonly maximumFractionDigits: import('ts-type-forge').UintRange<0, 21>;
|
|
35
|
+
readonly minimumSignificantDigits?: import('ts-type-forge').UintRange<
|
|
36
|
+
1,
|
|
37
|
+
22
|
|
38
|
+
>;
|
|
39
|
+
readonly maximumSignificantDigits?: import('ts-type-forge').UintRange<
|
|
40
|
+
1,
|
|
41
|
+
22
|
|
42
|
+
>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface PluralRules {
|
|
46
|
+
resolvedOptions(): ResolvedPluralRulesOptions;
|
|
47
|
+
select(n: number): LDMLPluralRule;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface PluralRulesConstructor {
|
|
51
|
+
new (
|
|
52
|
+
locales?: string | readonly string[],
|
|
53
|
+
options?: PluralRulesOptions,
|
|
54
|
+
): PluralRules;
|
|
55
|
+
(
|
|
56
|
+
locales?: string | readonly string[],
|
|
57
|
+
options?: PluralRulesOptions,
|
|
58
|
+
): PluralRules;
|
|
59
|
+
supportedLocalesOf(
|
|
60
|
+
locales: string | readonly string[],
|
|
61
|
+
options?: { readonly localeMatcher?: 'lookup' | 'best fit' },
|
|
62
|
+
): string[];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const PluralRules: PluralRulesConstructor;
|
|
66
|
+
|
|
67
|
+
interface NumberFormatPartTypeRegistry {
|
|
68
|
+
readonly literal: never;
|
|
69
|
+
readonly nan: never;
|
|
70
|
+
readonly infinity: never;
|
|
71
|
+
readonly percent: never;
|
|
72
|
+
readonly integer: never;
|
|
73
|
+
readonly group: never;
|
|
74
|
+
readonly decimal: never;
|
|
75
|
+
readonly fraction: never;
|
|
76
|
+
readonly plusSign: never;
|
|
77
|
+
readonly minusSign: never;
|
|
78
|
+
readonly percentSign: never;
|
|
79
|
+
readonly currency: never;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry;
|
|
83
|
+
|
|
84
|
+
interface NumberFormatPart {
|
|
85
|
+
readonly type: NumberFormatPartTypes;
|
|
86
|
+
readonly value: string;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
interface NumberFormat {
|
|
90
|
+
formatToParts(number?: number | bigint): NumberFormatPart[];
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Represents the completion of an asynchronous operation
|
|
5
|
+
*/
|
|
6
|
+
interface Promise<T> {
|
|
7
|
+
/**
|
|
8
|
+
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
|
|
9
|
+
* resolved value cannot be modified from the callback.
|
|
10
|
+
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
|
|
11
|
+
* @returns A Promise for the completion of the callback.
|
|
12
|
+
*/
|
|
13
|
+
finally(onfinally?: (() => void) | undefined | null): Promise<T>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
interface RegExpMatchArray {
|
|
4
|
+
readonly groups?: {
|
|
5
|
+
readonly [key: string]: string;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface RegExpExecArray {
|
|
10
|
+
readonly groups?: {
|
|
11
|
+
readonly [key: string]: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface RegExp {
|
|
16
|
+
/**
|
|
17
|
+
* Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression.
|
|
18
|
+
* Default is false. Read-only.
|
|
19
|
+
*/
|
|
20
|
+
readonly dotAll: boolean;
|
|
21
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
type FlatArray<Arr, Depth extends number> = {
|
|
4
|
+
readonly done: Arr;
|
|
5
|
+
readonly recur: Arr extends ReadonlyArray<infer InnerArr>
|
|
6
|
+
? FlatArray<
|
|
7
|
+
InnerArr,
|
|
8
|
+
(readonly [
|
|
9
|
+
-1,
|
|
10
|
+
0,
|
|
11
|
+
1,
|
|
12
|
+
2,
|
|
13
|
+
3,
|
|
14
|
+
4,
|
|
15
|
+
5,
|
|
16
|
+
6,
|
|
17
|
+
7,
|
|
18
|
+
8,
|
|
19
|
+
9,
|
|
20
|
+
10,
|
|
21
|
+
11,
|
|
22
|
+
12,
|
|
23
|
+
13,
|
|
24
|
+
14,
|
|
25
|
+
15,
|
|
26
|
+
16,
|
|
27
|
+
17,
|
|
28
|
+
18,
|
|
29
|
+
19,
|
|
30
|
+
20,
|
|
31
|
+
])[Depth]
|
|
32
|
+
>
|
|
33
|
+
: Arr;
|
|
34
|
+
}[Depth extends -1 ? 'done' : 'recur'];
|
|
35
|
+
|
|
36
|
+
interface ReadonlyArray<T> {
|
|
37
|
+
/**
|
|
38
|
+
* Calls a defined callback function on each element of an array. Then, flattens the result into
|
|
39
|
+
* a new array.
|
|
40
|
+
* This is identical to a map followed by flat with depth 1.
|
|
41
|
+
*
|
|
42
|
+
* @param callback A function that accepts up to three arguments. The flatMap method calls the
|
|
43
|
+
* callback function one time for each element in the array.
|
|
44
|
+
* @param thisArg An object to which the this keyword can refer in the callback function. If
|
|
45
|
+
* thisArg is omitted, undefined is used as the this value.
|
|
46
|
+
*/
|
|
47
|
+
flatMap<U, This = undefined>(
|
|
48
|
+
callback: (
|
|
49
|
+
this: This,
|
|
50
|
+
value: T,
|
|
51
|
+
index: number,
|
|
52
|
+
array: readonly T[],
|
|
53
|
+
) => U | ReadonlyArray<U>,
|
|
54
|
+
thisArg?: This,
|
|
55
|
+
): U[];
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
|
59
|
+
* specified depth.
|
|
60
|
+
*
|
|
61
|
+
* @param depth The maximum recursion depth
|
|
62
|
+
*/
|
|
63
|
+
flat<A, D extends number = 1>(this: A, depth?: D): FlatArray<A, D>[];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
interface Array<T> {
|
|
67
|
+
/**
|
|
68
|
+
* Calls a defined callback function on each element of an array. Then, flattens the result into
|
|
69
|
+
* a new array.
|
|
70
|
+
* This is identical to a map followed by flat with depth 1.
|
|
71
|
+
*
|
|
72
|
+
* @param callback A function that accepts up to three arguments. The flatMap method calls the
|
|
73
|
+
* callback function one time for each element in the array.
|
|
74
|
+
* @param thisArg An object to which the this keyword can refer in the callback function. If
|
|
75
|
+
* thisArg is omitted, undefined is used as the this value.
|
|
76
|
+
*/
|
|
77
|
+
flatMap<U, This = undefined>(
|
|
78
|
+
callback: (
|
|
79
|
+
this: This,
|
|
80
|
+
value: T,
|
|
81
|
+
index: number,
|
|
82
|
+
array: readonly T[],
|
|
83
|
+
) => U | ReadonlyArray<U>,
|
|
84
|
+
thisArg?: This,
|
|
85
|
+
): U[];
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
|
89
|
+
* specified depth.
|
|
90
|
+
*
|
|
91
|
+
* @param depth The maximum recursion depth
|
|
92
|
+
*/
|
|
93
|
+
flat<A, D extends number = 1>(this: A, depth?: D): FlatArray<A, D>[];
|
|
94
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
/// <reference lib="es2019" />
|
|
4
|
+
/// <reference lib="dom" />
|
|
5
|
+
/// <reference lib="webworker.importscripts" />
|
|
6
|
+
/// <reference lib="scripthost" />
|
|
7
|
+
/// <reference lib="dom.iterable" />
|
|
8
|
+
/// <reference lib="dom.asynciterable" />
|