strict-ts-lib-v5.0 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 +344 -0
- package/libs/decorators/legacy/index.d.ts +19 -0
- package/libs/dom/index.d.ts +25408 -0
- package/libs/dom/iterable/index.d.ts +630 -0
- package/libs/es2015/collection/index.d.ts +148 -0
- package/libs/es2015/core/index.d.ts +574 -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 +522 -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 +4 -0
- package/libs/es2017/full/index.d.ts +7 -0
- package/libs/es2017/index.d.ts +8 -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 +244 -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 +31 -0
- package/libs/es2018/full/index.d.ts +7 -0
- package/libs/es2018/index.d.ts +8 -0
- package/libs/es2018/intl/index.d.ts +102 -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 +7 -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 +833 -0
- package/libs/es2020/date/index.d.ts +35 -0
- package/libs/es2020/full/index.d.ts +7 -0
- package/libs/es2020/index.d.ts +11 -0
- package/libs/es2020/intl/index.d.ts +433 -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 +119 -0
- package/libs/es2020/string/index.d.ts +12 -0
- package/libs/es2020/symbol-wellknown/index.d.ts +21 -0
- package/libs/es2021/full/index.d.ts +7 -0
- package/libs/es2021/index.d.ts +7 -0
- package/libs/es2021/intl/index.d.ts +164 -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 +57 -0
- package/libs/es2022/array/index.d.ts +105 -0
- package/libs/es2022/error/index.d.ts +57 -0
- package/libs/es2022/full/index.d.ts +7 -0
- package/libs/es2022/index.d.ts +10 -0
- package/libs/es2022/intl/index.d.ts +98 -0
- package/libs/es2022/object/index.d.ts +41 -0
- package/libs/es2022/regexp/index.d.ts +23 -0
- package/libs/es2022/sharedmemory/index.d.ts +37 -0
- package/libs/es2022/string/index.d.ts +9 -0
- package/libs/es2023/array/index.d.ts +495 -0
- package/libs/es2023/full/index.d.ts +7 -0
- package/libs/es2023/index.d.ts +4 -0
- package/libs/es5/index.d.ts +5709 -0
- package/libs/es6/index.d.ts +7 -0
- package/libs/esnext/full/index.d.ts +7 -0
- package/libs/esnext/index.d.ts +4 -0
- package/libs/esnext/intl/index.d.ts +15 -0
- package/libs/scripthost/index.d.ts +310 -0
- package/libs/webworker/importscripts/index.d.ts +7 -0
- package/libs/webworker/index.d.ts +8426 -0
- package/libs/webworker/iterable/index.d.ts +439 -0
- package/package.json +23 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
interface Atomics {
|
|
4
|
+
/**
|
|
5
|
+
* A non-blocking, asynchronous version of wait which is usable on the main thread.
|
|
6
|
+
* Waits asynchronously on a shared memory location and returns a Promise
|
|
7
|
+
* @param typedArray A shared Int32Array or BigInt64Array.
|
|
8
|
+
* @param index The position in the typedArray to wait on.
|
|
9
|
+
* @param value The expected value to test.
|
|
10
|
+
* @param [timeout] The expected value to test.
|
|
11
|
+
*/
|
|
12
|
+
waitAsync(
|
|
13
|
+
typedArray: Int32Array,
|
|
14
|
+
index: number,
|
|
15
|
+
value: number,
|
|
16
|
+
timeout?: number,
|
|
17
|
+
):
|
|
18
|
+
| { readonly async: false; readonly value: 'not-equal' | 'timed-out' }
|
|
19
|
+
| { readonly async: true; readonly value: Promise<'ok' | 'timed-out'> };
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* A non-blocking, asynchronous version of wait which is usable on the main thread.
|
|
23
|
+
* Waits asynchronously on a shared memory location and returns a Promise
|
|
24
|
+
* @param typedArray A shared Int32Array or BigInt64Array.
|
|
25
|
+
* @param index The position in the typedArray to wait on.
|
|
26
|
+
* @param value The expected value to test.
|
|
27
|
+
* @param [timeout] The expected value to test.
|
|
28
|
+
*/
|
|
29
|
+
waitAsync(
|
|
30
|
+
typedArray: BigInt64Array,
|
|
31
|
+
index: number,
|
|
32
|
+
value: bigint,
|
|
33
|
+
timeout?: number,
|
|
34
|
+
):
|
|
35
|
+
| { readonly async: false; readonly value: 'not-equal' | 'timed-out' }
|
|
36
|
+
| { readonly async: true; readonly value: Promise<'ok' | 'timed-out'> };
|
|
37
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
interface String {
|
|
4
|
+
/**
|
|
5
|
+
* Returns a new String consisting of the single UTF-16 code unit located at the specified index.
|
|
6
|
+
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
7
|
+
*/
|
|
8
|
+
at(index: number): string | undefined;
|
|
9
|
+
}
|
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
interface Array<T> {
|
|
4
|
+
/**
|
|
5
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
6
|
+
* otherwise.
|
|
7
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
8
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
9
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
10
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
11
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
12
|
+
*/
|
|
13
|
+
findLast<S extends T>(
|
|
14
|
+
predicate: (value: T, index: number, array: readonly T[]) => value is S,
|
|
15
|
+
thisArg?: unknown,
|
|
16
|
+
): S | undefined;
|
|
17
|
+
findLast(
|
|
18
|
+
predicate: (value: T, index: number, array: readonly T[]) => boolean,
|
|
19
|
+
thisArg?: unknown,
|
|
20
|
+
): T | undefined;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
24
|
+
* otherwise.
|
|
25
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
26
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
27
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
28
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
29
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
30
|
+
*/
|
|
31
|
+
findLastIndex(
|
|
32
|
+
predicate: (value: T, index: number, array: readonly T[]) => boolean,
|
|
33
|
+
thisArg?: unknown,
|
|
34
|
+
): number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface ReadonlyArray<T> {
|
|
38
|
+
/**
|
|
39
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
40
|
+
* otherwise.
|
|
41
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
42
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
43
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
44
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
45
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
46
|
+
*/
|
|
47
|
+
findLast<S extends T>(
|
|
48
|
+
predicate: (value: T, index: number, array: readonly T[]) => value is S,
|
|
49
|
+
thisArg?: unknown,
|
|
50
|
+
): S | undefined;
|
|
51
|
+
findLast(
|
|
52
|
+
predicate: (value: T, index: number, array: readonly T[]) => boolean,
|
|
53
|
+
thisArg?: unknown,
|
|
54
|
+
): T | undefined;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
58
|
+
* otherwise.
|
|
59
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
60
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
61
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
62
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
63
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
64
|
+
*/
|
|
65
|
+
findLastIndex(
|
|
66
|
+
predicate: (value: T, index: number, array: readonly T[]) => boolean,
|
|
67
|
+
thisArg?: unknown,
|
|
68
|
+
): number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
interface Int8Array {
|
|
72
|
+
/**
|
|
73
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
74
|
+
* otherwise.
|
|
75
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
76
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
77
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
78
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
79
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
80
|
+
*/
|
|
81
|
+
findLast<S extends import('ts-type-forge').Int8>(
|
|
82
|
+
predicate: (
|
|
83
|
+
value: import('ts-type-forge').Int8,
|
|
84
|
+
index: number,
|
|
85
|
+
array: Int8Array,
|
|
86
|
+
) => value is S,
|
|
87
|
+
thisArg?: unknown,
|
|
88
|
+
): S | undefined;
|
|
89
|
+
findLast(
|
|
90
|
+
predicate: (
|
|
91
|
+
value: import('ts-type-forge').Int8,
|
|
92
|
+
index: number,
|
|
93
|
+
array: Int8Array,
|
|
94
|
+
) => boolean,
|
|
95
|
+
thisArg?: unknown,
|
|
96
|
+
): import('ts-type-forge').Int8 | undefined;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
100
|
+
* otherwise.
|
|
101
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
102
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
103
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
104
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
105
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
106
|
+
*/
|
|
107
|
+
findLastIndex(
|
|
108
|
+
predicate: (
|
|
109
|
+
value: import('ts-type-forge').Int8,
|
|
110
|
+
index: number,
|
|
111
|
+
array: Int8Array,
|
|
112
|
+
) => boolean,
|
|
113
|
+
thisArg?: unknown,
|
|
114
|
+
): number;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
interface Uint8Array {
|
|
118
|
+
/**
|
|
119
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
120
|
+
* otherwise.
|
|
121
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
122
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
123
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
124
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
125
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
126
|
+
*/
|
|
127
|
+
findLast<S extends import('ts-type-forge').Uint8>(
|
|
128
|
+
predicate: (
|
|
129
|
+
value: import('ts-type-forge').Uint8,
|
|
130
|
+
index: number,
|
|
131
|
+
array: Uint8Array,
|
|
132
|
+
) => value is S,
|
|
133
|
+
thisArg?: unknown,
|
|
134
|
+
): S | undefined;
|
|
135
|
+
findLast(
|
|
136
|
+
predicate: (
|
|
137
|
+
value: import('ts-type-forge').Uint8,
|
|
138
|
+
index: number,
|
|
139
|
+
array: Uint8Array,
|
|
140
|
+
) => boolean,
|
|
141
|
+
thisArg?: unknown,
|
|
142
|
+
): import('ts-type-forge').Uint8 | undefined;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
146
|
+
* otherwise.
|
|
147
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
148
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
149
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
150
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
151
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
152
|
+
*/
|
|
153
|
+
findLastIndex(
|
|
154
|
+
predicate: (
|
|
155
|
+
value: import('ts-type-forge').Uint8,
|
|
156
|
+
index: number,
|
|
157
|
+
array: Uint8Array,
|
|
158
|
+
) => boolean,
|
|
159
|
+
thisArg?: unknown,
|
|
160
|
+
): number;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
interface Uint8ClampedArray {
|
|
164
|
+
/**
|
|
165
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
166
|
+
* otherwise.
|
|
167
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
168
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
169
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
170
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
171
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
172
|
+
*/
|
|
173
|
+
findLast<S extends import('ts-type-forge').Uint8>(
|
|
174
|
+
predicate: (
|
|
175
|
+
value: import('ts-type-forge').Uint8,
|
|
176
|
+
index: number,
|
|
177
|
+
array: Uint8ClampedArray,
|
|
178
|
+
) => value is S,
|
|
179
|
+
thisArg?: unknown,
|
|
180
|
+
): S | undefined;
|
|
181
|
+
findLast(
|
|
182
|
+
predicate: (
|
|
183
|
+
value: import('ts-type-forge').Uint8,
|
|
184
|
+
index: number,
|
|
185
|
+
array: Uint8ClampedArray,
|
|
186
|
+
) => boolean,
|
|
187
|
+
thisArg?: unknown,
|
|
188
|
+
): import('ts-type-forge').Uint8 | undefined;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
192
|
+
* otherwise.
|
|
193
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
194
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
195
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
196
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
197
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
198
|
+
*/
|
|
199
|
+
findLastIndex(
|
|
200
|
+
predicate: (
|
|
201
|
+
value: import('ts-type-forge').Uint8,
|
|
202
|
+
index: number,
|
|
203
|
+
array: Uint8ClampedArray,
|
|
204
|
+
) => boolean,
|
|
205
|
+
thisArg?: unknown,
|
|
206
|
+
): number;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
interface Int16Array {
|
|
210
|
+
/**
|
|
211
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
212
|
+
* otherwise.
|
|
213
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
214
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
215
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
216
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
217
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
218
|
+
*/
|
|
219
|
+
findLast<S extends number>(
|
|
220
|
+
predicate: (value: number, index: number, array: Int16Array) => value is S,
|
|
221
|
+
thisArg?: unknown,
|
|
222
|
+
): S | undefined;
|
|
223
|
+
findLast(
|
|
224
|
+
predicate: (value: number, index: number, array: Int16Array) => boolean,
|
|
225
|
+
thisArg?: unknown,
|
|
226
|
+
): number | undefined;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
230
|
+
* otherwise.
|
|
231
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
232
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
233
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
234
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
235
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
236
|
+
*/
|
|
237
|
+
findLastIndex(
|
|
238
|
+
predicate: (value: number, index: number, array: Int16Array) => boolean,
|
|
239
|
+
thisArg?: unknown,
|
|
240
|
+
): number;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
interface Uint16Array {
|
|
244
|
+
/**
|
|
245
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
246
|
+
* otherwise.
|
|
247
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
248
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
249
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
250
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
251
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
252
|
+
*/
|
|
253
|
+
findLast<S extends number>(
|
|
254
|
+
predicate: (value: number, index: number, array: Uint16Array) => value is S,
|
|
255
|
+
thisArg?: unknown,
|
|
256
|
+
): S | undefined;
|
|
257
|
+
findLast(
|
|
258
|
+
predicate: (value: number, index: number, array: Uint16Array) => boolean,
|
|
259
|
+
thisArg?: unknown,
|
|
260
|
+
): number | undefined;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
264
|
+
* otherwise.
|
|
265
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
266
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
267
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
268
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
269
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
270
|
+
*/
|
|
271
|
+
findLastIndex(
|
|
272
|
+
predicate: (value: number, index: number, array: Uint16Array) => boolean,
|
|
273
|
+
thisArg?: unknown,
|
|
274
|
+
): number;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
interface Int32Array {
|
|
278
|
+
/**
|
|
279
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
280
|
+
* otherwise.
|
|
281
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
282
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
283
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
284
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
285
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
286
|
+
*/
|
|
287
|
+
findLast<S extends number>(
|
|
288
|
+
predicate: (value: number, index: number, array: Int32Array) => value is S,
|
|
289
|
+
thisArg?: unknown,
|
|
290
|
+
): S | undefined;
|
|
291
|
+
findLast(
|
|
292
|
+
predicate: (value: number, index: number, array: Int32Array) => boolean,
|
|
293
|
+
thisArg?: unknown,
|
|
294
|
+
): number | undefined;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
298
|
+
* otherwise.
|
|
299
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
300
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
301
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
302
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
303
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
304
|
+
*/
|
|
305
|
+
findLastIndex(
|
|
306
|
+
predicate: (value: number, index: number, array: Int32Array) => boolean,
|
|
307
|
+
thisArg?: unknown,
|
|
308
|
+
): number;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
interface Uint32Array {
|
|
312
|
+
/**
|
|
313
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
314
|
+
* otherwise.
|
|
315
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
316
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
317
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
318
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
319
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
320
|
+
*/
|
|
321
|
+
findLast<S extends number>(
|
|
322
|
+
predicate: (value: number, index: number, array: Uint32Array) => value is S,
|
|
323
|
+
thisArg?: unknown,
|
|
324
|
+
): S | undefined;
|
|
325
|
+
findLast(
|
|
326
|
+
predicate: (value: number, index: number, array: Uint32Array) => boolean,
|
|
327
|
+
thisArg?: unknown,
|
|
328
|
+
): number | undefined;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
332
|
+
* otherwise.
|
|
333
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
334
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
335
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
336
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
337
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
338
|
+
*/
|
|
339
|
+
findLastIndex(
|
|
340
|
+
predicate: (value: number, index: number, array: Uint32Array) => boolean,
|
|
341
|
+
thisArg?: unknown,
|
|
342
|
+
): number;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
interface Float32Array {
|
|
346
|
+
/**
|
|
347
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
348
|
+
* otherwise.
|
|
349
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
350
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
351
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
352
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
353
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
354
|
+
*/
|
|
355
|
+
findLast<S extends number>(
|
|
356
|
+
predicate: (
|
|
357
|
+
value: number,
|
|
358
|
+
index: number,
|
|
359
|
+
array: Float32Array,
|
|
360
|
+
) => value is S,
|
|
361
|
+
thisArg?: unknown,
|
|
362
|
+
): S | undefined;
|
|
363
|
+
findLast(
|
|
364
|
+
predicate: (value: number, index: number, array: Float32Array) => boolean,
|
|
365
|
+
thisArg?: unknown,
|
|
366
|
+
): number | undefined;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
370
|
+
* otherwise.
|
|
371
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
372
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
373
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
374
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
375
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
376
|
+
*/
|
|
377
|
+
findLastIndex(
|
|
378
|
+
predicate: (value: number, index: number, array: Float32Array) => boolean,
|
|
379
|
+
thisArg?: unknown,
|
|
380
|
+
): number;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
interface Float64Array {
|
|
384
|
+
/**
|
|
385
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
386
|
+
* otherwise.
|
|
387
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
388
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
389
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
390
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
391
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
392
|
+
*/
|
|
393
|
+
findLast<S extends number>(
|
|
394
|
+
predicate: (
|
|
395
|
+
value: number,
|
|
396
|
+
index: number,
|
|
397
|
+
array: Float64Array,
|
|
398
|
+
) => value is S,
|
|
399
|
+
thisArg?: unknown,
|
|
400
|
+
): S | undefined;
|
|
401
|
+
findLast(
|
|
402
|
+
predicate: (value: number, index: number, array: Float64Array) => boolean,
|
|
403
|
+
thisArg?: unknown,
|
|
404
|
+
): number | undefined;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
408
|
+
* otherwise.
|
|
409
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
410
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
411
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
412
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
413
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
414
|
+
*/
|
|
415
|
+
findLastIndex(
|
|
416
|
+
predicate: (value: number, index: number, array: Float64Array) => boolean,
|
|
417
|
+
thisArg?: unknown,
|
|
418
|
+
): number;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
interface BigInt64Array {
|
|
422
|
+
/**
|
|
423
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
424
|
+
* otherwise.
|
|
425
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
426
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
427
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
428
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
429
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
430
|
+
*/
|
|
431
|
+
findLast<S extends bigint>(
|
|
432
|
+
predicate: (
|
|
433
|
+
value: bigint,
|
|
434
|
+
index: number,
|
|
435
|
+
array: BigInt64Array,
|
|
436
|
+
) => value is S,
|
|
437
|
+
thisArg?: unknown,
|
|
438
|
+
): S | undefined;
|
|
439
|
+
findLast(
|
|
440
|
+
predicate: (value: bigint, index: number, array: BigInt64Array) => boolean,
|
|
441
|
+
thisArg?: unknown,
|
|
442
|
+
): bigint | undefined;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
446
|
+
* otherwise.
|
|
447
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
448
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
449
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
450
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
451
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
452
|
+
*/
|
|
453
|
+
findLastIndex(
|
|
454
|
+
predicate: (value: bigint, index: number, array: BigInt64Array) => boolean,
|
|
455
|
+
thisArg?: unknown,
|
|
456
|
+
): number;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
interface BigUint64Array {
|
|
460
|
+
/**
|
|
461
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
462
|
+
* otherwise.
|
|
463
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
464
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
465
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
466
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
467
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
468
|
+
*/
|
|
469
|
+
findLast<S extends bigint>(
|
|
470
|
+
predicate: (
|
|
471
|
+
value: bigint,
|
|
472
|
+
index: number,
|
|
473
|
+
array: BigUint64Array,
|
|
474
|
+
) => value is S,
|
|
475
|
+
thisArg?: unknown,
|
|
476
|
+
): S | undefined;
|
|
477
|
+
findLast(
|
|
478
|
+
predicate: (value: bigint, index: number, array: BigUint64Array) => boolean,
|
|
479
|
+
thisArg?: unknown,
|
|
480
|
+
): bigint | undefined;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
484
|
+
* otherwise.
|
|
485
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
486
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
487
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
488
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
489
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
490
|
+
*/
|
|
491
|
+
findLastIndex(
|
|
492
|
+
predicate: (value: bigint, index: number, array: BigUint64Array) => boolean,
|
|
493
|
+
thisArg?: unknown,
|
|
494
|
+
): number;
|
|
495
|
+
}
|