Skip to content

Commit 95fab91

Browse files
committed
Remove this: void
Signed-off-by: mbasov2 <[email protected]>
1 parent a6a6e74 commit 95fab91

File tree

2 files changed

+104
-104
lines changed

2 files changed

+104
-104
lines changed

src/lib/es2023.array.d.ts

+39-39
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ interface Array<T> {
88
* @param thisArg If provided, it will be used as the this value for each invocation of
99
* predicate. If it is not provided, undefined is used instead.
1010
*/
11-
findLast<S extends T>(predicate: (this: void, value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined;
12-
findLast(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined;
11+
findLast<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined;
12+
findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined;
1313

1414
/**
1515
* Returns the index of the last element in the array where predicate is true, and -1
@@ -20,7 +20,7 @@ interface Array<T> {
2020
* @param thisArg If provided, it will be used as the this value for each invocation of
2121
* predicate. If it is not provided, undefined is used instead.
2222
*/
23-
findLastIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number;
23+
findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number;
2424
}
2525

2626
interface ReadonlyArray<T> {
@@ -33,8 +33,8 @@ interface ReadonlyArray<T> {
3333
* @param thisArg If provided, it will be used as the this value for each invocation of
3434
* predicate. If it is not provided, undefined is used instead.
3535
*/
36-
findLast<S extends T>(predicate: (this: void, value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined;
37-
findLast(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined;
36+
findLast<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S | undefined;
37+
findLast(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T | undefined;
3838

3939
/**
4040
* Returns the index of the last element in the array where predicate is true, and -1
@@ -45,7 +45,7 @@ interface ReadonlyArray<T> {
4545
* @param thisArg If provided, it will be used as the this value for each invocation of
4646
* predicate. If it is not provided, undefined is used instead.
4747
*/
48-
findLastIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number;
48+
findLastIndex(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): number;
4949
}
5050

5151
interface Int8Array {
@@ -58,8 +58,8 @@ interface Int8Array {
5858
* @param thisArg If provided, it will be used as the this value for each invocation of
5959
* predicate. If it is not provided, undefined is used instead.
6060
*/
61-
findLast<S extends number>(predicate: (this: void, value: number, index: number, obj: readonly number[]) => value is S, thisArg?: any): S | undefined;
62-
findLast(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number | undefined;
61+
findLast<S extends number>(predicate: (value: number, index: number, array: Int8Array) => value is S, thisArg?: any): S | undefined;
62+
findLast(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number | undefined;
6363

6464
/**
6565
* Returns the index of the last element in the array where predicate is true, and -1
@@ -70,7 +70,7 @@ interface Int8Array {
7070
* @param thisArg If provided, it will be used as the this value for each invocation of
7171
* predicate. If it is not provided, undefined is used instead.
7272
*/
73-
findLastIndex(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number;
73+
findLastIndex(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number;
7474
}
7575

7676
interface Uint8Array {
@@ -83,8 +83,8 @@ interface Uint8Array {
8383
* @param thisArg If provided, it will be used as the this value for each invocation of
8484
* predicate. If it is not provided, undefined is used instead.
8585
*/
86-
findLast<S extends number>(predicate: (this: void, value: number, index: number, obj: readonly number[]) => value is S, thisArg?: any): S | undefined;
87-
findLast(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number | undefined;
86+
findLast<S extends number>(predicate: (value: number, index: number, array: Uint8Array) => value is S, thisArg?: any): S | undefined;
87+
findLast(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number | undefined;
8888

8989
/**
9090
* Returns the index of the last element in the array where predicate is true, and -1
@@ -95,7 +95,7 @@ interface Uint8Array {
9595
* @param thisArg If provided, it will be used as the this value for each invocation of
9696
* predicate. If it is not provided, undefined is used instead.
9797
*/
98-
findLastIndex(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number;
98+
findLastIndex(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number;
9999
}
100100

101101
interface Uint8ClampedArray {
@@ -108,8 +108,8 @@ interface Uint8ClampedArray {
108108
* @param thisArg If provided, it will be used as the this value for each invocation of
109109
* predicate. If it is not provided, undefined is used instead.
110110
*/
111-
findLast<S extends number>(predicate: (this: void, value: number, index: number, obj: readonly number[]) => value is S, thisArg?: any): S | undefined;
112-
findLast(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number | undefined;
111+
findLast<S extends number>(predicate: (value: number, index: number, array: Uint8ClampedArray[]) => value is S, thisArg?: any): S | undefined;
112+
findLast(predicate: (value: number, index: number, array: Uint8ClampedArray[]) => unknown, thisArg?: any): number | undefined;
113113

114114
/**
115115
* Returns the index of the last element in the array where predicate is true, and -1
@@ -120,7 +120,7 @@ interface Uint8ClampedArray {
120120
* @param thisArg If provided, it will be used as the this value for each invocation of
121121
* predicate. If it is not provided, undefined is used instead.
122122
*/
123-
findLastIndex(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number;
123+
findLastIndex(predicate: (value: number, index: number, array: Uint8ClampedArray[]) => unknown, thisArg?: any): number;
124124
}
125125

126126
interface Int16Array {
@@ -133,8 +133,8 @@ interface Int16Array {
133133
* @param thisArg If provided, it will be used as the this value for each invocation of
134134
* predicate. If it is not provided, undefined is used instead.
135135
*/
136-
findLast<S extends number>(predicate: (this: void, value: number, index: number, obj: readonly number[]) => value is S, thisArg?: any): S | undefined;
137-
findLast(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number | undefined;
136+
findLast<S extends number>(predicate: (value: number, index: number, array: Int16Array) => value is S, thisArg?: any): S | undefined;
137+
findLast(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number | undefined;
138138

139139
/**
140140
* Returns the index of the last element in the array where predicate is true, and -1
@@ -145,7 +145,7 @@ interface Int16Array {
145145
* @param thisArg If provided, it will be used as the this value for each invocation of
146146
* predicate. If it is not provided, undefined is used instead.
147147
*/
148-
findLastIndex(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number;
148+
findLastIndex(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number;
149149
}
150150

151151
interface Uint16Array {
@@ -158,8 +158,8 @@ interface Uint16Array {
158158
* @param thisArg If provided, it will be used as the this value for each invocation of
159159
* predicate. If it is not provided, undefined is used instead.
160160
*/
161-
findLast<S extends number>(predicate: (this: void, value: number, index: number, obj: readonly number[]) => value is S, thisArg?: any): S | undefined;
162-
findLast(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number | undefined;
161+
findLast<S extends number>(predicate: (value: number, index: number, array: Uint16Array) => value is S, thisArg?: any): S | undefined;
162+
findLast(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number | undefined;
163163

164164
/**
165165
* Returns the index of the last element in the array where predicate is true, and -1
@@ -170,7 +170,7 @@ interface Uint16Array {
170170
* @param thisArg If provided, it will be used as the this value for each invocation of
171171
* predicate. If it is not provided, undefined is used instead.
172172
*/
173-
findLastIndex(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number;
173+
findLastIndex(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number;
174174
}
175175

176176
interface Int32Array {
@@ -183,8 +183,8 @@ interface Int32Array {
183183
* @param thisArg If provided, it will be used as the this value for each invocation of
184184
* predicate. If it is not provided, undefined is used instead.
185185
*/
186-
findLast<S extends number>(predicate: (this: void, value: number, index: number, obj: readonly number[]) => value is S, thisArg?: any): S | undefined;
187-
findLast(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number | undefined;
186+
findLast<S extends number>(predicate: (value: number, index: number, array: Int32Array) => value is S, thisArg?: any): S | undefined;
187+
findLast(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number | undefined;
188188

189189
/**
190190
* Returns the index of the last element in the array where predicate is true, and -1
@@ -195,7 +195,7 @@ interface Int32Array {
195195
* @param thisArg If provided, it will be used as the this value for each invocation of
196196
* predicate. If it is not provided, undefined is used instead.
197197
*/
198-
findLastIndex(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number;
198+
findLastIndex(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number;
199199
}
200200

201201
interface Uint32Array {
@@ -208,8 +208,8 @@ interface Uint32Array {
208208
* @param thisArg If provided, it will be used as the this value for each invocation of
209209
* predicate. If it is not provided, undefined is used instead.
210210
*/
211-
findLast<S extends number>(predicate: (this: void, value: number, index: number, obj: readonly number[]) => value is S, thisArg?: any): S | undefined;
212-
findLast(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number | undefined;
211+
findLast<S extends number>(predicate: (value: number, index: number, array: Uint32Array) => value is S, thisArg?: any): S | undefined;
212+
findLast(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number | undefined;
213213

214214
/**
215215
* Returns the index of the last element in the array where predicate is true, and -1
@@ -220,7 +220,7 @@ interface Uint32Array {
220220
* @param thisArg If provided, it will be used as the this value for each invocation of
221221
* predicate. If it is not provided, undefined is used instead.
222222
*/
223-
findLastIndex(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number;
223+
findLastIndex(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number;
224224
}
225225

226226
interface Float32Array {
@@ -233,8 +233,8 @@ interface Float32Array {
233233
* @param thisArg If provided, it will be used as the this value for each invocation of
234234
* predicate. If it is not provided, undefined is used instead.
235235
*/
236-
findLast<S extends number>(predicate: (this: void, value: number, index: number, obj: readonly number[]) => value is S, thisArg?: any): S | undefined;
237-
findLast(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number | undefined;
236+
findLast<S extends number>(predicate: (value: number, index: number, array: Float32Array) => value is S, thisArg?: any): S | undefined;
237+
findLast(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number | undefined;
238238

239239
/**
240240
* Returns the index of the last element in the array where predicate is true, and -1
@@ -245,7 +245,7 @@ interface Float32Array {
245245
* @param thisArg If provided, it will be used as the this value for each invocation of
246246
* predicate. If it is not provided, undefined is used instead.
247247
*/
248-
findLastIndex(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number;
248+
findLastIndex(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number;
249249
}
250250

251251
interface Float64Array {
@@ -258,8 +258,8 @@ interface Float64Array {
258258
* @param thisArg If provided, it will be used as the this value for each invocation of
259259
* predicate. If it is not provided, undefined is used instead.
260260
*/
261-
findLast<S extends number>(predicate: (this: void, value: number, index: number, obj: readonly number[]) => value is S, thisArg?: any): S | undefined;
262-
findLast(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number | undefined;
261+
findLast<S extends number>(predicate: (value: number, index: number, array: Float64Array) => value is S, thisArg?: any): S | undefined;
262+
findLast(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number | undefined;
263263

264264
/**
265265
* Returns the index of the last element in the array where predicate is true, and -1
@@ -270,7 +270,7 @@ interface Float64Array {
270270
* @param thisArg If provided, it will be used as the this value for each invocation of
271271
* predicate. If it is not provided, undefined is used instead.
272272
*/
273-
findLastIndex(predicate: (value: number, index: number, obj: readonly number[]) => unknown, thisArg?: any): number;
273+
findLastIndex(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number;
274274
}
275275

276276
interface BigInt64Array {
@@ -283,8 +283,8 @@ interface BigInt64Array {
283283
* @param thisArg If provided, it will be used as the this value for each invocation of
284284
* predicate. If it is not provided, undefined is used instead.
285285
*/
286-
findLast<S extends bigint>(predicate: (this: void, value: bigint, index: number, obj: readonly bigint[]) => value is S, thisArg?: any): S | undefined;
287-
findLast(predicate: (value: bigint, index: number, obj: readonly bigint[]) => unknown, thisArg?: any): bigint | undefined;
286+
findLast<S extends bigint>(predicate: (value: bigint, index: number, array: BigInt64Array) => value is S, thisArg?: any): S | undefined;
287+
findLast(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): bigint | undefined;
288288

289289
/**
290290
* Returns the index of the last element in the array where predicate is true, and -1
@@ -295,7 +295,7 @@ interface BigInt64Array {
295295
* @param thisArg If provided, it will be used as the this value for each invocation of
296296
* predicate. If it is not provided, undefined is used instead.
297297
*/
298-
findLastIndex(predicate: (value: bigint, index: number, obj: readonly bigint[]) => unknown, thisArg?: any): number;
298+
findLastIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): number;
299299
}
300300

301301
interface BigUint64Array {
@@ -308,8 +308,8 @@ interface BigUint64Array {
308308
* @param thisArg If provided, it will be used as the this value for each invocation of
309309
* predicate. If it is not provided, undefined is used instead.
310310
*/
311-
findLast<S extends bigint>(predicate: (this: void, value: bigint, index: number, obj: readonly bigint[]) => value is S, thisArg?: any): S | undefined;
312-
findLast(predicate: (value: bigint, index: number, obj: readonly bigint[]) => unknown, thisArg?: any): bigint | undefined;
311+
findLast<S extends bigint>(predicate: (value: bigint, index: number, array: BigUint64Array) => value is S, thisArg?: any): S | undefined;
312+
findLast(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): bigint | undefined;
313313

314314
/**
315315
* Returns the index of the last element in the array where predicate is true, and -1
@@ -320,5 +320,5 @@ interface BigUint64Array {
320320
* @param thisArg If provided, it will be used as the this value for each invocation of
321321
* predicate. If it is not provided, undefined is used instead.
322322
*/
323-
findLastIndex(predicate: (value: bigint, index: number, obj: readonly bigint[]) => unknown, thisArg?: any): number;
323+
findLastIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): number;
324324
}

0 commit comments

Comments
 (0)