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