@@ -252,7 +252,7 @@ interface String {
252252 [ Symbol . iterator ] ( ) : StringIterator < string > ;
253253}
254254
255- interface Int8Array {
255+ interface Int8Array < TArrayBuffer extends ArrayBufferLike > {
256256 [ Symbol . iterator ] ( ) : ArrayIterator < number > ;
257257 /**
258258 * Returns an array of key, value pairs for every entry in the array
@@ -269,18 +269,25 @@ interface Int8Array {
269269}
270270
271271interface Int8ArrayConstructor {
272- new ( elements : Iterable < number > ) : Int8Array ;
272+ new ( elements : Iterable < number > ) : Int8Array < ArrayBuffer > ;
273273
274274 /**
275275 * Creates an array from an array-like or iterable object.
276276 * @param arrayLike An array-like or iterable object to convert to an array.
277277 * @param mapfn A mapping function to call on every element of the array.
278278 * @param thisArg Value of 'this' used to invoke the mapfn.
279279 */
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 > ;
281288}
282289
283- interface Uint8Array {
290+ interface Uint8Array < TArrayBuffer extends ArrayBufferLike > {
284291 [ Symbol . iterator ] ( ) : ArrayIterator < number > ;
285292 /**
286293 * Returns an array of key, value pairs for every entry in the array
@@ -297,18 +304,25 @@ interface Uint8Array {
297304}
298305
299306interface Uint8ArrayConstructor {
300- new ( elements : Iterable < number > ) : Uint8Array ;
307+ new ( elements : Iterable < number > ) : Uint8Array < ArrayBuffer > ;
301308
302309 /**
303310 * Creates an array from an array-like or iterable object.
304311 * @param arrayLike An array-like or iterable object to convert to an array.
305312 * @param mapfn A mapping function to call on every element of the array.
306313 * @param thisArg Value of 'this' used to invoke the mapfn.
307314 */
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 > ;
309323}
310324
311- interface Uint8ClampedArray {
325+ interface Uint8ClampedArray < TArrayBuffer extends ArrayBufferLike > {
312326 [ Symbol . iterator ] ( ) : ArrayIterator < number > ;
313327 /**
314328 * Returns an array of key, value pairs for every entry in the array
@@ -327,18 +341,25 @@ interface Uint8ClampedArray {
327341}
328342
329343interface Uint8ClampedArrayConstructor {
330- new ( elements : Iterable < number > ) : Uint8ClampedArray ;
344+ new ( elements : Iterable < number > ) : Uint8ClampedArray < ArrayBuffer > ;
331345
332346 /**
333347 * Creates an array from an array-like or iterable object.
334348 * @param arrayLike An array-like or iterable object to convert to an array.
335349 * @param mapfn A mapping function to call on every element of the array.
336350 * @param thisArg Value of 'this' used to invoke the mapfn.
337351 */
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 > ;
339360}
340361
341- interface Int16Array {
362+ interface Int16Array < TArrayBuffer extends ArrayBufferLike > {
342363 [ Symbol . iterator ] ( ) : ArrayIterator < number > ;
343364 /**
344365 * Returns an array of key, value pairs for every entry in the array
@@ -357,18 +378,25 @@ interface Int16Array {
357378}
358379
359380interface Int16ArrayConstructor {
360- new ( elements : Iterable < number > ) : Int16Array ;
381+ new ( elements : Iterable < number > ) : Int16Array < ArrayBuffer > ;
361382
362383 /**
363384 * Creates an array from an array-like or iterable object.
364385 * @param arrayLike An array-like or iterable object to convert to an array.
365386 * @param mapfn A mapping function to call on every element of the array.
366387 * @param thisArg Value of 'this' used to invoke the mapfn.
367388 */
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 > ;
369397}
370398
371- interface Uint16Array {
399+ interface Uint16Array < TArrayBuffer extends ArrayBufferLike > {
372400 [ Symbol . iterator ] ( ) : ArrayIterator < number > ;
373401 /**
374402 * Returns an array of key, value pairs for every entry in the array
@@ -385,18 +413,25 @@ interface Uint16Array {
385413}
386414
387415interface Uint16ArrayConstructor {
388- new ( elements : Iterable < number > ) : Uint16Array ;
416+ new ( elements : Iterable < number > ) : Uint16Array < ArrayBuffer > ;
389417
390418 /**
391419 * Creates an array from an array-like or iterable object.
392420 * @param arrayLike An array-like or iterable object to convert to an array.
393421 * @param mapfn A mapping function to call on every element of the array.
394422 * @param thisArg Value of 'this' used to invoke the mapfn.
395423 */
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 > ;
397432}
398433
399- interface Int32Array {
434+ interface Int32Array < TArrayBuffer extends ArrayBufferLike > {
400435 [ Symbol . iterator ] ( ) : ArrayIterator < number > ;
401436 /**
402437 * Returns an array of key, value pairs for every entry in the array
@@ -413,18 +448,25 @@ interface Int32Array {
413448}
414449
415450interface Int32ArrayConstructor {
416- new ( elements : Iterable < number > ) : Int32Array ;
451+ new ( elements : Iterable < number > ) : Int32Array < ArrayBuffer > ;
417452
418453 /**
419454 * Creates an array from an array-like or iterable object.
420455 * @param arrayLike An array-like or iterable object to convert to an array.
421456 * @param mapfn A mapping function to call on every element of the array.
422457 * @param thisArg Value of 'this' used to invoke the mapfn.
423458 */
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 > ;
425467}
426468
427- interface Uint32Array {
469+ interface Uint32Array < TArrayBuffer extends ArrayBufferLike > {
428470 [ Symbol . iterator ] ( ) : ArrayIterator < number > ;
429471 /**
430472 * Returns an array of key, value pairs for every entry in the array
@@ -441,18 +483,25 @@ interface Uint32Array {
441483}
442484
443485interface Uint32ArrayConstructor {
444- new ( elements : Iterable < number > ) : Uint32Array ;
486+ new ( elements : Iterable < number > ) : Uint32Array < ArrayBuffer > ;
445487
446488 /**
447489 * Creates an array from an array-like or iterable object.
448490 * @param arrayLike An array-like or iterable object to convert to an array.
449491 * @param mapfn A mapping function to call on every element of the array.
450492 * @param thisArg Value of 'this' used to invoke the mapfn.
451493 */
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 > ;
453502}
454503
455- interface Float32Array {
504+ interface Float32Array < TArrayBuffer extends ArrayBufferLike > {
456505 [ Symbol . iterator ] ( ) : ArrayIterator < number > ;
457506 /**
458507 * Returns an array of key, value pairs for every entry in the array
@@ -469,18 +518,25 @@ interface Float32Array {
469518}
470519
471520interface Float32ArrayConstructor {
472- new ( elements : Iterable < number > ) : Float32Array ;
521+ new ( elements : Iterable < number > ) : Float32Array < ArrayBuffer > ;
473522
474523 /**
475524 * Creates an array from an array-like or iterable object.
476525 * @param arrayLike An array-like or iterable object to convert to an array.
477526 * @param mapfn A mapping function to call on every element of the array.
478527 * @param thisArg Value of 'this' used to invoke the mapfn.
479528 */
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 > ;
481537}
482538
483- interface Float64Array {
539+ interface Float64Array < TArrayBuffer extends ArrayBufferLike > {
484540 [ Symbol . iterator ] ( ) : ArrayIterator < number > ;
485541 /**
486542 * Returns an array of key, value pairs for every entry in the array
@@ -497,13 +553,20 @@ interface Float64Array {
497553}
498554
499555interface Float64ArrayConstructor {
500- new ( elements : Iterable < number > ) : Float64Array ;
556+ new ( elements : Iterable < number > ) : Float64Array < ArrayBuffer > ;
501557
502558 /**
503559 * Creates an array from an array-like or iterable object.
504560 * @param arrayLike An array-like or iterable object to convert to an array.
505561 * @param mapfn A mapping function to call on every element of the array.
506562 * @param thisArg Value of 'this' used to invoke the mapfn.
507563 */
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 > ;
509572}
0 commit comments