@@ -252,7 +252,7 @@ interface String {
252
252
[ Symbol . iterator ] ( ) : StringIterator < string > ;
253
253
}
254
254
255
- interface Int8Array {
255
+ interface Int8Array < TArrayBuffer extends ArrayBufferLike > {
256
256
[ Symbol . iterator ] ( ) : ArrayIterator < number > ;
257
257
/**
258
258
* Returns an array of key, value pairs for every entry in the array
@@ -269,18 +269,25 @@ interface Int8Array {
269
269
}
270
270
271
271
interface Int8ArrayConstructor {
272
- new ( elements : Iterable < number > ) : Int8Array ;
272
+ new ( elements : Iterable < number > ) : Int8Array < ArrayBuffer > ;
273
273
274
274
/**
275
275
* Creates an array from an array-like or iterable object.
276
276
* @param arrayLike An array-like or iterable object to convert to an array.
277
277
* @param mapfn A mapping function to call on every element of the array.
278
278
* @param thisArg Value of 'this' used to invoke the mapfn.
279
279
*/
280
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Int8Array ;
280
+ from ( arrayLike : Iterable < number > ) : Int8Array < ArrayBuffer > ;
281
+ /**
282
+ * Creates an array from an array-like or iterable object.
283
+ * @param arrayLike An array-like or iterable object to convert to an array.
284
+ * @param mapfn A mapping function to call on every element of the array.
285
+ * @param thisArg Value of 'this' used to invoke the mapfn.
286
+ */
287
+ from < T > ( arrayLike : Iterable < T > , mapfn ?: ( v : T , k : number ) => number , thisArg ?: any ) : Int8Array < ArrayBuffer > ;
281
288
}
282
289
283
- interface Uint8Array {
290
+ interface Uint8Array < TArrayBuffer extends ArrayBufferLike > {
284
291
[ Symbol . iterator ] ( ) : ArrayIterator < number > ;
285
292
/**
286
293
* Returns an array of key, value pairs for every entry in the array
@@ -297,18 +304,25 @@ interface Uint8Array {
297
304
}
298
305
299
306
interface Uint8ArrayConstructor {
300
- new ( elements : Iterable < number > ) : Uint8Array ;
307
+ new ( elements : Iterable < number > ) : Uint8Array < ArrayBuffer > ;
301
308
302
309
/**
303
310
* Creates an array from an array-like or iterable object.
304
311
* @param arrayLike An array-like or iterable object to convert to an array.
305
312
* @param mapfn A mapping function to call on every element of the array.
306
313
* @param thisArg Value of 'this' used to invoke the mapfn.
307
314
*/
308
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Uint8Array ;
315
+ from ( arrayLike : Iterable < number > ) : Uint8Array < ArrayBuffer > ;
316
+ /**
317
+ * Creates an array from an array-like or iterable object.
318
+ * @param arrayLike An array-like or iterable object to convert to an array.
319
+ * @param mapfn A mapping function to call on every element of the array.
320
+ * @param thisArg Value of 'this' used to invoke the mapfn.
321
+ */
322
+ from < T > ( arrayLike : Iterable < T > , mapfn ?: ( v : T , k : number ) => number , thisArg ?: any ) : Uint8Array < ArrayBuffer > ;
309
323
}
310
324
311
- interface Uint8ClampedArray {
325
+ interface Uint8ClampedArray < TArrayBuffer extends ArrayBufferLike > {
312
326
[ Symbol . iterator ] ( ) : ArrayIterator < number > ;
313
327
/**
314
328
* Returns an array of key, value pairs for every entry in the array
@@ -327,18 +341,25 @@ interface Uint8ClampedArray {
327
341
}
328
342
329
343
interface Uint8ClampedArrayConstructor {
330
- new ( elements : Iterable < number > ) : Uint8ClampedArray ;
344
+ new ( elements : Iterable < number > ) : Uint8ClampedArray < ArrayBuffer > ;
331
345
332
346
/**
333
347
* Creates an array from an array-like or iterable object.
334
348
* @param arrayLike An array-like or iterable object to convert to an array.
335
349
* @param mapfn A mapping function to call on every element of the array.
336
350
* @param thisArg Value of 'this' used to invoke the mapfn.
337
351
*/
338
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Uint8ClampedArray ;
352
+ from ( arrayLike : Iterable < number > ) : Uint8ClampedArray < ArrayBuffer > ;
353
+ /**
354
+ * Creates an array from an array-like or iterable object.
355
+ * @param arrayLike An array-like or iterable object to convert to an array.
356
+ * @param mapfn A mapping function to call on every element of the array.
357
+ * @param thisArg Value of 'this' used to invoke the mapfn.
358
+ */
359
+ from < T > ( arrayLike : Iterable < T > , mapfn ?: ( v : T , k : number ) => number , thisArg ?: any ) : Uint8ClampedArray < ArrayBuffer > ;
339
360
}
340
361
341
- interface Int16Array {
362
+ interface Int16Array < TArrayBuffer extends ArrayBufferLike > {
342
363
[ Symbol . iterator ] ( ) : ArrayIterator < number > ;
343
364
/**
344
365
* Returns an array of key, value pairs for every entry in the array
@@ -357,18 +378,25 @@ interface Int16Array {
357
378
}
358
379
359
380
interface Int16ArrayConstructor {
360
- new ( elements : Iterable < number > ) : Int16Array ;
381
+ new ( elements : Iterable < number > ) : Int16Array < ArrayBuffer > ;
361
382
362
383
/**
363
384
* Creates an array from an array-like or iterable object.
364
385
* @param arrayLike An array-like or iterable object to convert to an array.
365
386
* @param mapfn A mapping function to call on every element of the array.
366
387
* @param thisArg Value of 'this' used to invoke the mapfn.
367
388
*/
368
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Int16Array ;
389
+ from ( arrayLike : Iterable < number > ) : Int16Array < ArrayBuffer > ;
390
+ /**
391
+ * Creates an array from an array-like or iterable object.
392
+ * @param arrayLike An array-like or iterable object to convert to an array.
393
+ * @param mapfn A mapping function to call on every element of the array.
394
+ * @param thisArg Value of 'this' used to invoke the mapfn.
395
+ */
396
+ from < T > ( arrayLike : Iterable < T > , mapfn ?: ( v : T , k : number ) => number , thisArg ?: any ) : Int16Array < ArrayBuffer > ;
369
397
}
370
398
371
- interface Uint16Array {
399
+ interface Uint16Array < TArrayBuffer extends ArrayBufferLike > {
372
400
[ Symbol . iterator ] ( ) : ArrayIterator < number > ;
373
401
/**
374
402
* Returns an array of key, value pairs for every entry in the array
@@ -385,18 +413,25 @@ interface Uint16Array {
385
413
}
386
414
387
415
interface Uint16ArrayConstructor {
388
- new ( elements : Iterable < number > ) : Uint16Array ;
416
+ new ( elements : Iterable < number > ) : Uint16Array < ArrayBuffer > ;
389
417
390
418
/**
391
419
* Creates an array from an array-like or iterable object.
392
420
* @param arrayLike An array-like or iterable object to convert to an array.
393
421
* @param mapfn A mapping function to call on every element of the array.
394
422
* @param thisArg Value of 'this' used to invoke the mapfn.
395
423
*/
396
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Uint16Array ;
424
+ from ( arrayLike : Iterable < number > ) : Uint16Array < ArrayBuffer > ;
425
+ /**
426
+ * Creates an array from an array-like or iterable object.
427
+ * @param arrayLike An array-like or iterable object to convert to an array.
428
+ * @param mapfn A mapping function to call on every element of the array.
429
+ * @param thisArg Value of 'this' used to invoke the mapfn.
430
+ */
431
+ from < T > ( arrayLike : Iterable < T > , mapfn ?: ( v : T , k : number ) => number , thisArg ?: any ) : Uint16Array < ArrayBuffer > ;
397
432
}
398
433
399
- interface Int32Array {
434
+ interface Int32Array < TArrayBuffer extends ArrayBufferLike > {
400
435
[ Symbol . iterator ] ( ) : ArrayIterator < number > ;
401
436
/**
402
437
* Returns an array of key, value pairs for every entry in the array
@@ -413,18 +448,25 @@ interface Int32Array {
413
448
}
414
449
415
450
interface Int32ArrayConstructor {
416
- new ( elements : Iterable < number > ) : Int32Array ;
451
+ new ( elements : Iterable < number > ) : Int32Array < ArrayBuffer > ;
417
452
418
453
/**
419
454
* Creates an array from an array-like or iterable object.
420
455
* @param arrayLike An array-like or iterable object to convert to an array.
421
456
* @param mapfn A mapping function to call on every element of the array.
422
457
* @param thisArg Value of 'this' used to invoke the mapfn.
423
458
*/
424
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Int32Array ;
459
+ from ( arrayLike : Iterable < number > ) : Int32Array < ArrayBuffer > ;
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 < T > ( arrayLike : Iterable < T > , mapfn ?: ( v : T , k : number ) => number , thisArg ?: any ) : Int32Array < ArrayBuffer > ;
425
467
}
426
468
427
- interface Uint32Array {
469
+ interface Uint32Array < TArrayBuffer extends ArrayBufferLike > {
428
470
[ Symbol . iterator ] ( ) : ArrayIterator < number > ;
429
471
/**
430
472
* Returns an array of key, value pairs for every entry in the array
@@ -441,18 +483,25 @@ interface Uint32Array {
441
483
}
442
484
443
485
interface Uint32ArrayConstructor {
444
- new ( elements : Iterable < number > ) : Uint32Array ;
486
+ new ( elements : Iterable < number > ) : Uint32Array < ArrayBuffer > ;
445
487
446
488
/**
447
489
* Creates an array from an array-like or iterable object.
448
490
* @param arrayLike An array-like or iterable object to convert to an array.
449
491
* @param mapfn A mapping function to call on every element of the array.
450
492
* @param thisArg Value of 'this' used to invoke the mapfn.
451
493
*/
452
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Uint32Array ;
494
+ from ( arrayLike : Iterable < number > ) : Uint32Array < ArrayBuffer > ;
495
+ /**
496
+ * Creates an array from an array-like or iterable object.
497
+ * @param arrayLike An array-like or iterable object to convert to an array.
498
+ * @param mapfn A mapping function to call on every element of the array.
499
+ * @param thisArg Value of 'this' used to invoke the mapfn.
500
+ */
501
+ from < T > ( arrayLike : Iterable < T > , mapfn ?: ( v : T , k : number ) => number , thisArg ?: any ) : Uint32Array < ArrayBuffer > ;
453
502
}
454
503
455
- interface Float32Array {
504
+ interface Float32Array < TArrayBuffer extends ArrayBufferLike > {
456
505
[ Symbol . iterator ] ( ) : ArrayIterator < number > ;
457
506
/**
458
507
* Returns an array of key, value pairs for every entry in the array
@@ -469,18 +518,25 @@ interface Float32Array {
469
518
}
470
519
471
520
interface Float32ArrayConstructor {
472
- new ( elements : Iterable < number > ) : Float32Array ;
521
+ new ( elements : Iterable < number > ) : Float32Array < ArrayBuffer > ;
473
522
474
523
/**
475
524
* Creates an array from an array-like or iterable object.
476
525
* @param arrayLike An array-like or iterable object to convert to an array.
477
526
* @param mapfn A mapping function to call on every element of the array.
478
527
* @param thisArg Value of 'this' used to invoke the mapfn.
479
528
*/
480
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Float32Array ;
529
+ from ( arrayLike : Iterable < number > ) : Float32Array < ArrayBuffer > ;
530
+ /**
531
+ * Creates an array from an array-like or iterable object.
532
+ * @param arrayLike An array-like or iterable object to convert to an array.
533
+ * @param mapfn A mapping function to call on every element of the array.
534
+ * @param thisArg Value of 'this' used to invoke the mapfn.
535
+ */
536
+ from < T > ( arrayLike : Iterable < T > , mapfn ?: ( v : T , k : number ) => number , thisArg ?: any ) : Float32Array < ArrayBuffer > ;
481
537
}
482
538
483
- interface Float64Array {
539
+ interface Float64Array < TArrayBuffer extends ArrayBufferLike > {
484
540
[ Symbol . iterator ] ( ) : ArrayIterator < number > ;
485
541
/**
486
542
* Returns an array of key, value pairs for every entry in the array
@@ -497,13 +553,20 @@ interface Float64Array {
497
553
}
498
554
499
555
interface Float64ArrayConstructor {
500
- new ( elements : Iterable < number > ) : Float64Array ;
556
+ new ( elements : Iterable < number > ) : Float64Array < ArrayBuffer > ;
501
557
502
558
/**
503
559
* Creates an array from an array-like or iterable object.
504
560
* @param arrayLike An array-like or iterable object to convert to an array.
505
561
* @param mapfn A mapping function to call on every element of the array.
506
562
* @param thisArg Value of 'this' used to invoke the mapfn.
507
563
*/
508
- from ( arrayLike : Iterable < number > , mapfn ?: ( v : number , k : number ) => number , thisArg ?: any ) : Float64Array ;
564
+ from ( arrayLike : Iterable < number > ) : Float64Array < ArrayBuffer > ;
565
+ /**
566
+ * Creates an array from an array-like or iterable object.
567
+ * @param arrayLike An array-like or iterable object to convert to an array.
568
+ * @param mapfn A mapping function to call on every element of the array.
569
+ * @param thisArg Value of 'this' used to invoke the mapfn.
570
+ */
571
+ from < T > ( arrayLike : Iterable < T > , mapfn ?: ( v : T , k : number ) => number , thisArg ?: any ) : Float64Array < ArrayBuffer > ;
509
572
}
0 commit comments