@@ -209,7 +209,7 @@ interface String {
209
209
[ Symbol . iterator ] ( ) : IterableIterator < string > ;
210
210
}
211
211
212
- interface Int8Array {
212
+ interface TypedArray < T > {
213
213
[ Symbol . iterator ] ( ) : IterableIterator < number > ;
214
214
/**
215
215
* Returns an array of key, value pairs for every entry in the array
@@ -225,243 +225,14 @@ interface Int8Array {
225
225
values ( ) : IterableIterator < number > ;
226
226
}
227
227
228
- interface Int8ArrayConstructor {
229
- new ( elements : Iterable < number > ) : Int8Array ;
228
+ interface TypedArrayConstructor < T > {
229
+ new ( elements : Iterable < number > ) : T ;
230
230
231
231
/**
232
232
* Creates an array from an array-like or iterable object.
233
233
* @param arrayLike An array-like or iterable object to convert to an array.
234
234
* @param mapfn A mapping function to call on every element of the array.
235
235
* @param thisArg Value of 'this' used to invoke the mapfn.
236
236
*/
237
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Int8Array ;
238
- }
239
-
240
- interface Uint8Array {
241
- [ Symbol . iterator ] ( ) : IterableIterator < number > ;
242
- /**
243
- * Returns an array of key, value pairs for every entry in the array
244
- */
245
- entries ( ) : IterableIterator < [ number , number ] > ;
246
- /**
247
- * Returns an list of keys in the array
248
- */
249
- keys ( ) : IterableIterator < number > ;
250
- /**
251
- * Returns an list of values in the array
252
- */
253
- values ( ) : IterableIterator < number > ;
254
- }
255
-
256
- interface Uint8ArrayConstructor {
257
- new ( elements : Iterable < number > ) : Uint8Array ;
258
-
259
- /**
260
- * Creates an array from an array-like or iterable object.
261
- * @param arrayLike An array-like or iterable object to convert to an array.
262
- * @param mapfn A mapping function to call on every element of the array.
263
- * @param thisArg Value of 'this' used to invoke the mapfn.
264
- */
265
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Uint8Array ;
266
- }
267
-
268
- interface Uint8ClampedArray {
269
- [ Symbol . iterator ] ( ) : IterableIterator < number > ;
270
- /**
271
- * Returns an array of key, value pairs for every entry in the array
272
- */
273
- entries ( ) : IterableIterator < [ number , number ] > ;
274
-
275
- /**
276
- * Returns an list of keys in the array
277
- */
278
- keys ( ) : IterableIterator < number > ;
279
-
280
- /**
281
- * Returns an list of values in the array
282
- */
283
- values ( ) : IterableIterator < number > ;
284
- }
285
-
286
- interface Uint8ClampedArrayConstructor {
287
- new ( elements : Iterable < number > ) : Uint8ClampedArray ;
288
-
289
-
290
- /**
291
- * Creates an array from an array-like or iterable object.
292
- * @param arrayLike An array-like or iterable object to convert to an array.
293
- * @param mapfn A mapping function to call on every element of the array.
294
- * @param thisArg Value of 'this' used to invoke the mapfn.
295
- */
296
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Uint8ClampedArray ;
297
- }
298
-
299
- interface Int16Array {
300
- [ Symbol . iterator ] ( ) : IterableIterator < number > ;
301
- /**
302
- * Returns an array of key, value pairs for every entry in the array
303
- */
304
- entries ( ) : IterableIterator < [ number , number ] > ;
305
-
306
- /**
307
- * Returns an list of keys in the array
308
- */
309
- keys ( ) : IterableIterator < number > ;
310
-
311
- /**
312
- * Returns an list of values in the array
313
- */
314
- values ( ) : IterableIterator < number > ;
315
- }
316
-
317
- interface Int16ArrayConstructor {
318
- new ( elements : Iterable < number > ) : Int16Array ;
319
-
320
- /**
321
- * Creates an array from an array-like or iterable object.
322
- * @param arrayLike An array-like or iterable object to convert to an array.
323
- * @param mapfn A mapping function to call on every element of the array.
324
- * @param thisArg Value of 'this' used to invoke the mapfn.
325
- */
326
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Int16Array ;
327
- }
328
-
329
- interface Uint16Array {
330
- [ Symbol . iterator ] ( ) : IterableIterator < number > ;
331
- /**
332
- * Returns an array of key, value pairs for every entry in the array
333
- */
334
- entries ( ) : IterableIterator < [ number , number ] > ;
335
- /**
336
- * Returns an list of keys in the array
337
- */
338
- keys ( ) : IterableIterator < number > ;
339
- /**
340
- * Returns an list of values in the array
341
- */
342
- values ( ) : IterableIterator < number > ;
343
- }
344
-
345
- interface Uint16ArrayConstructor {
346
- new ( elements : Iterable < number > ) : Uint16Array ;
347
-
348
- /**
349
- * Creates an array from an array-like or iterable object.
350
- * @param arrayLike An array-like or iterable object to convert to an array.
351
- * @param mapfn A mapping function to call on every element of the array.
352
- * @param thisArg Value of 'this' used to invoke the mapfn.
353
- */
354
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Uint16Array ;
355
- }
356
-
357
- interface Int32Array {
358
- [ Symbol . iterator ] ( ) : IterableIterator < number > ;
359
- /**
360
- * Returns an array of key, value pairs for every entry in the array
361
- */
362
- entries ( ) : IterableIterator < [ number , number ] > ;
363
- /**
364
- * Returns an list of keys in the array
365
- */
366
- keys ( ) : IterableIterator < number > ;
367
- /**
368
- * Returns an list of values in the array
369
- */
370
- values ( ) : IterableIterator < number > ;
371
- }
372
-
373
- interface Int32ArrayConstructor {
374
- new ( elements : Iterable < number > ) : Int32Array ;
375
-
376
- /**
377
- * Creates an array from an array-like or iterable object.
378
- * @param arrayLike An array-like or iterable object to convert to an array.
379
- * @param mapfn A mapping function to call on every element of the array.
380
- * @param thisArg Value of 'this' used to invoke the mapfn.
381
- */
382
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Int32Array ;
383
- }
384
-
385
- interface Uint32Array {
386
- [ Symbol . iterator ] ( ) : IterableIterator < number > ;
387
- /**
388
- * Returns an array of key, value pairs for every entry in the array
389
- */
390
- entries ( ) : IterableIterator < [ number , number ] > ;
391
- /**
392
- * Returns an list of keys in the array
393
- */
394
- keys ( ) : IterableIterator < number > ;
395
- /**
396
- * Returns an list of values in the array
397
- */
398
- values ( ) : IterableIterator < number > ;
399
- }
400
-
401
- interface Uint32ArrayConstructor {
402
- new ( elements : Iterable < number > ) : Uint32Array ;
403
-
404
- /**
405
- * Creates an array from an array-like or iterable object.
406
- * @param arrayLike An array-like or iterable object to convert to an array.
407
- * @param mapfn A mapping function to call on every element of the array.
408
- * @param thisArg Value of 'this' used to invoke the mapfn.
409
- */
410
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Uint32Array ;
411
- }
412
-
413
- interface Float32Array {
414
- [ Symbol . iterator ] ( ) : IterableIterator < number > ;
415
- /**
416
- * Returns an array of key, value pairs for every entry in the array
417
- */
418
- entries ( ) : IterableIterator < [ number , number ] > ;
419
- /**
420
- * Returns an list of keys in the array
421
- */
422
- keys ( ) : IterableIterator < number > ;
423
- /**
424
- * Returns an list of values in the array
425
- */
426
- values ( ) : IterableIterator < number > ;
427
- }
428
-
429
- interface Float32ArrayConstructor {
430
- new ( elements : Iterable < number > ) : Float32Array ;
431
-
432
- /**
433
- * Creates an array from an array-like or iterable object.
434
- * @param arrayLike An array-like or iterable object to convert to an array.
435
- * @param mapfn A mapping function to call on every element of the array.
436
- * @param thisArg Value of 'this' used to invoke the mapfn.
437
- */
438
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Float32Array ;
439
- }
440
-
441
- interface Float64Array {
442
- [ Symbol . iterator ] ( ) : IterableIterator < number > ;
443
- /**
444
- * Returns an array of key, value pairs for every entry in the array
445
- */
446
- entries ( ) : IterableIterator < [ number , number ] > ;
447
- /**
448
- * Returns an list of keys in the array
449
- */
450
- keys ( ) : IterableIterator < number > ;
451
- /**
452
- * Returns an list of values in the array
453
- */
454
- values ( ) : IterableIterator < number > ;
455
- }
456
-
457
- interface Float64ArrayConstructor {
458
- new ( elements : Iterable < number > ) : Float64Array ;
459
-
460
- /**
461
- * Creates an array from an array-like or iterable object.
462
- * @param arrayLike An array-like or iterable object to convert to an array.
463
- * @param mapfn A mapping function to call on every element of the array.
464
- * @param thisArg Value of 'this' used to invoke the mapfn.
465
- */
466
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Float64Array ;
237
+ from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : T ;
467
238
}
0 commit comments