typescript 5.7.0-dev.20240924 → 5.7.0-dev.20240925
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.es2015.core.d.ts +9 -9
- package/lib/lib.es2015.iterable.d.ts +90 -27
- package/lib/lib.es2015.symbol.wellknown.d.ts +10 -10
- package/lib/lib.es2016.array.include.d.ts +9 -9
- package/lib/lib.es2017.sharedmemory.d.ts +12 -12
- package/lib/lib.es2017.typedarrays.d.ts +9 -9
- package/lib/lib.es2020.bigint.d.ts +51 -49
- package/lib/lib.es2020.sharedmemory.d.ts +11 -11
- package/lib/lib.es2022.array.d.ts +11 -11
- package/lib/lib.es2023.array.d.ts +99 -99
- package/lib/lib.es5.d.ts +251 -251
- package/lib/tsc.js +56 -18
- package/lib/typescript.js +64 -23
- package/package.json +2 -2
package/lib/lib.es2015.core.d.ts
CHANGED
|
@@ -560,38 +560,38 @@ interface StringConstructor {
|
|
|
560
560
|
raw(template: { raw: readonly string[] | ArrayLike<string>; }, ...substitutions: any[]): string;
|
|
561
561
|
}
|
|
562
562
|
|
|
563
|
-
interface Int8Array {
|
|
563
|
+
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
564
564
|
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
565
565
|
}
|
|
566
566
|
|
|
567
|
-
interface Uint8Array {
|
|
567
|
+
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
568
568
|
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
569
569
|
}
|
|
570
570
|
|
|
571
|
-
interface Uint8ClampedArray {
|
|
571
|
+
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
|
|
572
572
|
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
573
573
|
}
|
|
574
574
|
|
|
575
|
-
interface Int16Array {
|
|
575
|
+
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
576
576
|
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
577
577
|
}
|
|
578
578
|
|
|
579
|
-
interface Uint16Array {
|
|
579
|
+
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
580
580
|
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
581
581
|
}
|
|
582
582
|
|
|
583
|
-
interface Int32Array {
|
|
583
|
+
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
584
584
|
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
585
585
|
}
|
|
586
586
|
|
|
587
|
-
interface Uint32Array {
|
|
587
|
+
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
588
588
|
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
589
589
|
}
|
|
590
590
|
|
|
591
|
-
interface Float32Array {
|
|
591
|
+
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
592
592
|
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
-
interface Float64Array {
|
|
595
|
+
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
596
596
|
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
597
597
|
}
|
|
@@ -270,7 +270,7 @@ interface String {
|
|
|
270
270
|
[Symbol.iterator](): StringIterator<string>;
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
interface Int8Array {
|
|
273
|
+
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
274
274
|
[Symbol.iterator](): ArrayIterator<number>;
|
|
275
275
|
/**
|
|
276
276
|
* Returns an array of key, value pairs for every entry in the array
|
|
@@ -287,7 +287,7 @@ interface Int8Array {
|
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
interface Int8ArrayConstructor {
|
|
290
|
-
new (elements: Iterable<number>): Int8Array
|
|
290
|
+
new (elements: Iterable<number>): Int8Array<ArrayBuffer>;
|
|
291
291
|
|
|
292
292
|
/**
|
|
293
293
|
* Creates an array from an array-like or iterable object.
|
|
@@ -295,10 +295,17 @@ interface Int8ArrayConstructor {
|
|
|
295
295
|
* @param mapfn A mapping function to call on every element of the array.
|
|
296
296
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
297
297
|
*/
|
|
298
|
-
from(arrayLike: Iterable<number
|
|
298
|
+
from(arrayLike: Iterable<number>): Int8Array<ArrayBuffer>;
|
|
299
|
+
/**
|
|
300
|
+
* Creates an array from an array-like or iterable object.
|
|
301
|
+
* @param arrayLike An array-like or iterable object to convert to an array.
|
|
302
|
+
* @param mapfn A mapping function to call on every element of the array.
|
|
303
|
+
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
304
|
+
*/
|
|
305
|
+
from<T>(arrayLike: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array<ArrayBuffer>;
|
|
299
306
|
}
|
|
300
307
|
|
|
301
|
-
interface Uint8Array {
|
|
308
|
+
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
302
309
|
[Symbol.iterator](): ArrayIterator<number>;
|
|
303
310
|
/**
|
|
304
311
|
* Returns an array of key, value pairs for every entry in the array
|
|
@@ -315,7 +322,7 @@ interface Uint8Array {
|
|
|
315
322
|
}
|
|
316
323
|
|
|
317
324
|
interface Uint8ArrayConstructor {
|
|
318
|
-
new (elements: Iterable<number>): Uint8Array
|
|
325
|
+
new (elements: Iterable<number>): Uint8Array<ArrayBuffer>;
|
|
319
326
|
|
|
320
327
|
/**
|
|
321
328
|
* Creates an array from an array-like or iterable object.
|
|
@@ -323,10 +330,17 @@ interface Uint8ArrayConstructor {
|
|
|
323
330
|
* @param mapfn A mapping function to call on every element of the array.
|
|
324
331
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
325
332
|
*/
|
|
326
|
-
from(arrayLike: Iterable<number
|
|
333
|
+
from(arrayLike: Iterable<number>): Uint8Array<ArrayBuffer>;
|
|
334
|
+
/**
|
|
335
|
+
* Creates an array from an array-like or iterable object.
|
|
336
|
+
* @param arrayLike An array-like or iterable object to convert to an array.
|
|
337
|
+
* @param mapfn A mapping function to call on every element of the array.
|
|
338
|
+
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
339
|
+
*/
|
|
340
|
+
from<T>(arrayLike: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
|
|
327
341
|
}
|
|
328
342
|
|
|
329
|
-
interface Uint8ClampedArray {
|
|
343
|
+
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
|
|
330
344
|
[Symbol.iterator](): ArrayIterator<number>;
|
|
331
345
|
/**
|
|
332
346
|
* Returns an array of key, value pairs for every entry in the array
|
|
@@ -345,7 +359,7 @@ interface Uint8ClampedArray {
|
|
|
345
359
|
}
|
|
346
360
|
|
|
347
361
|
interface Uint8ClampedArrayConstructor {
|
|
348
|
-
new (elements: Iterable<number>): Uint8ClampedArray
|
|
362
|
+
new (elements: Iterable<number>): Uint8ClampedArray<ArrayBuffer>;
|
|
349
363
|
|
|
350
364
|
/**
|
|
351
365
|
* Creates an array from an array-like or iterable object.
|
|
@@ -353,10 +367,17 @@ interface Uint8ClampedArrayConstructor {
|
|
|
353
367
|
* @param mapfn A mapping function to call on every element of the array.
|
|
354
368
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
355
369
|
*/
|
|
356
|
-
from(arrayLike: Iterable<number
|
|
370
|
+
from(arrayLike: Iterable<number>): Uint8ClampedArray<ArrayBuffer>;
|
|
371
|
+
/**
|
|
372
|
+
* Creates an array from an array-like or iterable object.
|
|
373
|
+
* @param arrayLike An array-like or iterable object to convert to an array.
|
|
374
|
+
* @param mapfn A mapping function to call on every element of the array.
|
|
375
|
+
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
376
|
+
*/
|
|
377
|
+
from<T>(arrayLike: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray<ArrayBuffer>;
|
|
357
378
|
}
|
|
358
379
|
|
|
359
|
-
interface Int16Array {
|
|
380
|
+
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
360
381
|
[Symbol.iterator](): ArrayIterator<number>;
|
|
361
382
|
/**
|
|
362
383
|
* Returns an array of key, value pairs for every entry in the array
|
|
@@ -375,7 +396,7 @@ interface Int16Array {
|
|
|
375
396
|
}
|
|
376
397
|
|
|
377
398
|
interface Int16ArrayConstructor {
|
|
378
|
-
new (elements: Iterable<number>): Int16Array
|
|
399
|
+
new (elements: Iterable<number>): Int16Array<ArrayBuffer>;
|
|
379
400
|
|
|
380
401
|
/**
|
|
381
402
|
* Creates an array from an array-like or iterable object.
|
|
@@ -383,10 +404,17 @@ interface Int16ArrayConstructor {
|
|
|
383
404
|
* @param mapfn A mapping function to call on every element of the array.
|
|
384
405
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
385
406
|
*/
|
|
386
|
-
from(arrayLike: Iterable<number
|
|
407
|
+
from(arrayLike: Iterable<number>): Int16Array<ArrayBuffer>;
|
|
408
|
+
/**
|
|
409
|
+
* Creates an array from an array-like or iterable object.
|
|
410
|
+
* @param arrayLike An array-like or iterable object to convert to an array.
|
|
411
|
+
* @param mapfn A mapping function to call on every element of the array.
|
|
412
|
+
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
413
|
+
*/
|
|
414
|
+
from<T>(arrayLike: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array<ArrayBuffer>;
|
|
387
415
|
}
|
|
388
416
|
|
|
389
|
-
interface Uint16Array {
|
|
417
|
+
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
390
418
|
[Symbol.iterator](): ArrayIterator<number>;
|
|
391
419
|
/**
|
|
392
420
|
* Returns an array of key, value pairs for every entry in the array
|
|
@@ -403,7 +431,7 @@ interface Uint16Array {
|
|
|
403
431
|
}
|
|
404
432
|
|
|
405
433
|
interface Uint16ArrayConstructor {
|
|
406
|
-
new (elements: Iterable<number>): Uint16Array
|
|
434
|
+
new (elements: Iterable<number>): Uint16Array<ArrayBuffer>;
|
|
407
435
|
|
|
408
436
|
/**
|
|
409
437
|
* Creates an array from an array-like or iterable object.
|
|
@@ -411,10 +439,17 @@ interface Uint16ArrayConstructor {
|
|
|
411
439
|
* @param mapfn A mapping function to call on every element of the array.
|
|
412
440
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
413
441
|
*/
|
|
414
|
-
from(arrayLike: Iterable<number
|
|
442
|
+
from(arrayLike: Iterable<number>): Uint16Array<ArrayBuffer>;
|
|
443
|
+
/**
|
|
444
|
+
* Creates an array from an array-like or iterable object.
|
|
445
|
+
* @param arrayLike An array-like or iterable object to convert to an array.
|
|
446
|
+
* @param mapfn A mapping function to call on every element of the array.
|
|
447
|
+
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
448
|
+
*/
|
|
449
|
+
from<T>(arrayLike: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array<ArrayBuffer>;
|
|
415
450
|
}
|
|
416
451
|
|
|
417
|
-
interface Int32Array {
|
|
452
|
+
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
418
453
|
[Symbol.iterator](): ArrayIterator<number>;
|
|
419
454
|
/**
|
|
420
455
|
* Returns an array of key, value pairs for every entry in the array
|
|
@@ -431,7 +466,7 @@ interface Int32Array {
|
|
|
431
466
|
}
|
|
432
467
|
|
|
433
468
|
interface Int32ArrayConstructor {
|
|
434
|
-
new (elements: Iterable<number>): Int32Array
|
|
469
|
+
new (elements: Iterable<number>): Int32Array<ArrayBuffer>;
|
|
435
470
|
|
|
436
471
|
/**
|
|
437
472
|
* Creates an array from an array-like or iterable object.
|
|
@@ -439,10 +474,17 @@ interface Int32ArrayConstructor {
|
|
|
439
474
|
* @param mapfn A mapping function to call on every element of the array.
|
|
440
475
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
441
476
|
*/
|
|
442
|
-
from(arrayLike: Iterable<number
|
|
477
|
+
from(arrayLike: Iterable<number>): Int32Array<ArrayBuffer>;
|
|
478
|
+
/**
|
|
479
|
+
* Creates an array from an array-like or iterable object.
|
|
480
|
+
* @param arrayLike An array-like or iterable object to convert to an array.
|
|
481
|
+
* @param mapfn A mapping function to call on every element of the array.
|
|
482
|
+
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
483
|
+
*/
|
|
484
|
+
from<T>(arrayLike: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array<ArrayBuffer>;
|
|
443
485
|
}
|
|
444
486
|
|
|
445
|
-
interface Uint32Array {
|
|
487
|
+
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
446
488
|
[Symbol.iterator](): ArrayIterator<number>;
|
|
447
489
|
/**
|
|
448
490
|
* Returns an array of key, value pairs for every entry in the array
|
|
@@ -459,7 +501,7 @@ interface Uint32Array {
|
|
|
459
501
|
}
|
|
460
502
|
|
|
461
503
|
interface Uint32ArrayConstructor {
|
|
462
|
-
new (elements: Iterable<number>): Uint32Array
|
|
504
|
+
new (elements: Iterable<number>): Uint32Array<ArrayBuffer>;
|
|
463
505
|
|
|
464
506
|
/**
|
|
465
507
|
* Creates an array from an array-like or iterable object.
|
|
@@ -467,10 +509,17 @@ interface Uint32ArrayConstructor {
|
|
|
467
509
|
* @param mapfn A mapping function to call on every element of the array.
|
|
468
510
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
469
511
|
*/
|
|
470
|
-
from(arrayLike: Iterable<number
|
|
512
|
+
from(arrayLike: Iterable<number>): Uint32Array<ArrayBuffer>;
|
|
513
|
+
/**
|
|
514
|
+
* Creates an array from an array-like or iterable object.
|
|
515
|
+
* @param arrayLike An array-like or iterable object to convert to an array.
|
|
516
|
+
* @param mapfn A mapping function to call on every element of the array.
|
|
517
|
+
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
518
|
+
*/
|
|
519
|
+
from<T>(arrayLike: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array<ArrayBuffer>;
|
|
471
520
|
}
|
|
472
521
|
|
|
473
|
-
interface Float32Array {
|
|
522
|
+
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
474
523
|
[Symbol.iterator](): ArrayIterator<number>;
|
|
475
524
|
/**
|
|
476
525
|
* Returns an array of key, value pairs for every entry in the array
|
|
@@ -487,7 +536,7 @@ interface Float32Array {
|
|
|
487
536
|
}
|
|
488
537
|
|
|
489
538
|
interface Float32ArrayConstructor {
|
|
490
|
-
new (elements: Iterable<number>): Float32Array
|
|
539
|
+
new (elements: Iterable<number>): Float32Array<ArrayBuffer>;
|
|
491
540
|
|
|
492
541
|
/**
|
|
493
542
|
* Creates an array from an array-like or iterable object.
|
|
@@ -495,10 +544,17 @@ interface Float32ArrayConstructor {
|
|
|
495
544
|
* @param mapfn A mapping function to call on every element of the array.
|
|
496
545
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
497
546
|
*/
|
|
498
|
-
from(arrayLike: Iterable<number
|
|
547
|
+
from(arrayLike: Iterable<number>): Float32Array<ArrayBuffer>;
|
|
548
|
+
/**
|
|
549
|
+
* Creates an array from an array-like or iterable object.
|
|
550
|
+
* @param arrayLike An array-like or iterable object to convert to an array.
|
|
551
|
+
* @param mapfn A mapping function to call on every element of the array.
|
|
552
|
+
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
553
|
+
*/
|
|
554
|
+
from<T>(arrayLike: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array<ArrayBuffer>;
|
|
499
555
|
}
|
|
500
556
|
|
|
501
|
-
interface Float64Array {
|
|
557
|
+
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
502
558
|
[Symbol.iterator](): ArrayIterator<number>;
|
|
503
559
|
/**
|
|
504
560
|
* Returns an array of key, value pairs for every entry in the array
|
|
@@ -515,7 +571,7 @@ interface Float64Array {
|
|
|
515
571
|
}
|
|
516
572
|
|
|
517
573
|
interface Float64ArrayConstructor {
|
|
518
|
-
new (elements: Iterable<number>): Float64Array
|
|
574
|
+
new (elements: Iterable<number>): Float64Array<ArrayBuffer>;
|
|
519
575
|
|
|
520
576
|
/**
|
|
521
577
|
* Creates an array from an array-like or iterable object.
|
|
@@ -523,5 +579,12 @@ interface Float64ArrayConstructor {
|
|
|
523
579
|
* @param mapfn A mapping function to call on every element of the array.
|
|
524
580
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
525
581
|
*/
|
|
526
|
-
from(arrayLike: Iterable<number
|
|
582
|
+
from(arrayLike: Iterable<number>): Float64Array<ArrayBuffer>;
|
|
583
|
+
/**
|
|
584
|
+
* Creates an array from an array-like or iterable object.
|
|
585
|
+
* @param arrayLike An array-like or iterable object to convert to an array.
|
|
586
|
+
* @param mapfn A mapping function to call on every element of the array.
|
|
587
|
+
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
588
|
+
*/
|
|
589
|
+
from<T>(arrayLike: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array<ArrayBuffer>;
|
|
527
590
|
}
|
|
@@ -272,43 +272,43 @@ interface ArrayBuffer {
|
|
|
272
272
|
readonly [Symbol.toStringTag]: string;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
interface DataView {
|
|
275
|
+
interface DataView<TArrayBuffer extends ArrayBufferLike> {
|
|
276
276
|
readonly [Symbol.toStringTag]: string;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
interface Int8Array {
|
|
279
|
+
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
280
280
|
readonly [Symbol.toStringTag]: "Int8Array";
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
interface Uint8Array {
|
|
283
|
+
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
284
284
|
readonly [Symbol.toStringTag]: "Uint8Array";
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
interface Uint8ClampedArray {
|
|
287
|
+
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
|
|
288
288
|
readonly [Symbol.toStringTag]: "Uint8ClampedArray";
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
interface Int16Array {
|
|
291
|
+
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
292
292
|
readonly [Symbol.toStringTag]: "Int16Array";
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
interface Uint16Array {
|
|
295
|
+
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
296
296
|
readonly [Symbol.toStringTag]: "Uint16Array";
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
interface Int32Array {
|
|
299
|
+
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
300
300
|
readonly [Symbol.toStringTag]: "Int32Array";
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
interface Uint32Array {
|
|
303
|
+
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
304
304
|
readonly [Symbol.toStringTag]: "Uint32Array";
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
interface Float32Array {
|
|
307
|
+
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
308
308
|
readonly [Symbol.toStringTag]: "Float32Array";
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
interface Float64Array {
|
|
311
|
+
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
312
312
|
readonly [Symbol.toStringTag]: "Float64Array";
|
|
313
313
|
}
|
|
314
314
|
|
|
@@ -34,7 +34,7 @@ interface ReadonlyArray<T> {
|
|
|
34
34
|
includes(searchElement: T, fromIndex?: number): boolean;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
interface Int8Array {
|
|
37
|
+
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
38
38
|
/**
|
|
39
39
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
40
40
|
* @param searchElement The element to search for.
|
|
@@ -43,7 +43,7 @@ interface Int8Array {
|
|
|
43
43
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
interface Uint8Array {
|
|
46
|
+
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
47
47
|
/**
|
|
48
48
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
49
49
|
* @param searchElement The element to search for.
|
|
@@ -52,7 +52,7 @@ interface Uint8Array {
|
|
|
52
52
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
interface Uint8ClampedArray {
|
|
55
|
+
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
|
|
56
56
|
/**
|
|
57
57
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
58
58
|
* @param searchElement The element to search for.
|
|
@@ -61,7 +61,7 @@ interface Uint8ClampedArray {
|
|
|
61
61
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
interface Int16Array {
|
|
64
|
+
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
65
65
|
/**
|
|
66
66
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
67
67
|
* @param searchElement The element to search for.
|
|
@@ -70,7 +70,7 @@ interface Int16Array {
|
|
|
70
70
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
interface Uint16Array {
|
|
73
|
+
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
74
74
|
/**
|
|
75
75
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
76
76
|
* @param searchElement The element to search for.
|
|
@@ -79,7 +79,7 @@ interface Uint16Array {
|
|
|
79
79
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
interface Int32Array {
|
|
82
|
+
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
83
83
|
/**
|
|
84
84
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
85
85
|
* @param searchElement The element to search for.
|
|
@@ -88,7 +88,7 @@ interface Int32Array {
|
|
|
88
88
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
interface Uint32Array {
|
|
91
|
+
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
92
92
|
/**
|
|
93
93
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
94
94
|
* @param searchElement The element to search for.
|
|
@@ -97,7 +97,7 @@ interface Uint32Array {
|
|
|
97
97
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
interface Float32Array {
|
|
100
|
+
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
101
101
|
/**
|
|
102
102
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
103
103
|
* @param searchElement The element to search for.
|
|
@@ -106,7 +106,7 @@ interface Float32Array {
|
|
|
106
106
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
interface Float64Array {
|
|
109
|
+
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
110
110
|
/**
|
|
111
111
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
112
112
|
* @param searchElement The element to search for.
|
|
@@ -49,28 +49,28 @@ interface Atomics {
|
|
|
49
49
|
* Until this atomic operation completes, any other read or write operation against the array
|
|
50
50
|
* will block.
|
|
51
51
|
*/
|
|
52
|
-
add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
52
|
+
add(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Stores the bitwise AND of a value with the value at the given position in the array,
|
|
56
56
|
* returning the original value. Until this atomic operation completes, any other read or
|
|
57
57
|
* write operation against the array will block.
|
|
58
58
|
*/
|
|
59
|
-
and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
59
|
+
and(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* Replaces the value at the given position in the array if the original value equals the given
|
|
63
63
|
* expected value, returning the original value. Until this atomic operation completes, any
|
|
64
64
|
* other read or write operation against the array will block.
|
|
65
65
|
*/
|
|
66
|
-
compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
66
|
+
compareExchange(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, expectedValue: number, replacementValue: number): number;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* Replaces the value at the given position in the array, returning the original value. Until
|
|
70
70
|
* this atomic operation completes, any other read or write operation against the array will
|
|
71
71
|
* block.
|
|
72
72
|
*/
|
|
73
|
-
exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
73
|
+
exchange(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* Returns a value indicating whether high-performance algorithms can use atomic operations
|
|
@@ -83,27 +83,27 @@ interface Atomics {
|
|
|
83
83
|
* Returns the value at the given position in the array. Until this atomic operation completes,
|
|
84
84
|
* any other read or write operation against the array will block.
|
|
85
85
|
*/
|
|
86
|
-
load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
86
|
+
load(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number): number;
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* Stores the bitwise OR of a value with the value at the given position in the array,
|
|
90
90
|
* returning the original value. Until this atomic operation completes, any other read or write
|
|
91
91
|
* operation against the array will block.
|
|
92
92
|
*/
|
|
93
|
-
or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
93
|
+
or(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* Stores a value at the given position in the array, returning the new value. Until this
|
|
97
97
|
* atomic operation completes, any other read or write operation against the array will block.
|
|
98
98
|
*/
|
|
99
|
-
store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
99
|
+
store(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
* Subtracts a value from the value at the given position in the array, returning the original
|
|
103
103
|
* value. Until this atomic operation completes, any other read or write operation against the
|
|
104
104
|
* array will block.
|
|
105
105
|
*/
|
|
106
|
-
sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
106
|
+
sub(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
109
|
* If the value at the given position in the array is equal to the provided value, the current
|
|
@@ -111,23 +111,23 @@ interface Atomics {
|
|
|
111
111
|
* `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns
|
|
112
112
|
* `"not-equal"`.
|
|
113
113
|
*/
|
|
114
|
-
wait(typedArray: Int32Array
|
|
114
|
+
wait(typedArray: Int32Array<ArrayBufferLike>, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out";
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* Wakes up sleeping agents that are waiting on the given index of the array, returning the
|
|
118
118
|
* number of agents that were awoken.
|
|
119
|
-
* @param typedArray A shared Int32Array
|
|
119
|
+
* @param typedArray A shared Int32Array<ArrayBufferLike>.
|
|
120
120
|
* @param index The position in the typedArray to wake up on.
|
|
121
121
|
* @param count The number of sleeping agents to notify. Defaults to +Infinity.
|
|
122
122
|
*/
|
|
123
|
-
notify(typedArray: Int32Array
|
|
123
|
+
notify(typedArray: Int32Array<ArrayBufferLike>, index: number, count?: number): number;
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* Stores the bitwise XOR of a value with the value at the given position in the array,
|
|
127
127
|
* returning the original value. Until this atomic operation completes, any other read or write
|
|
128
128
|
* operation against the array will block.
|
|
129
129
|
*/
|
|
130
|
-
xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
130
|
+
xor(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
131
131
|
|
|
132
132
|
readonly [Symbol.toStringTag]: "Atomics";
|
|
133
133
|
}
|
|
@@ -17,37 +17,37 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
interface Int8ArrayConstructor {
|
|
20
|
-
new (): Int8Array
|
|
20
|
+
new (): Int8Array<ArrayBuffer>;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
interface Uint8ArrayConstructor {
|
|
24
|
-
new (): Uint8Array
|
|
24
|
+
new (): Uint8Array<ArrayBuffer>;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
interface Uint8ClampedArrayConstructor {
|
|
28
|
-
new (): Uint8ClampedArray
|
|
28
|
+
new (): Uint8ClampedArray<ArrayBuffer>;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
interface Int16ArrayConstructor {
|
|
32
|
-
new (): Int16Array
|
|
32
|
+
new (): Int16Array<ArrayBuffer>;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
interface Uint16ArrayConstructor {
|
|
36
|
-
new (): Uint16Array
|
|
36
|
+
new (): Uint16Array<ArrayBuffer>;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
interface Int32ArrayConstructor {
|
|
40
|
-
new (): Int32Array
|
|
40
|
+
new (): Int32Array<ArrayBuffer>;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
interface Uint32ArrayConstructor {
|
|
44
|
-
new (): Uint32Array
|
|
44
|
+
new (): Uint32Array<ArrayBuffer>;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
interface Float32ArrayConstructor {
|
|
48
|
-
new (): Float32Array
|
|
48
|
+
new (): Float32Array<ArrayBuffer>;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
interface Float64ArrayConstructor {
|
|
52
|
-
new (): Float64Array
|
|
52
|
+
new (): Float64Array<ArrayBuffer>;
|
|
53
53
|
}
|