typescript 5.8.0-dev.20250120 → 5.8.0-dev.20250122
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/_tsc.js +13 -2
- package/lib/lib.es2015.iterable.d.ts +69 -54
- package/lib/lib.es2020.bigint.d.ts +38 -6
- package/lib/lib.es2023.array.d.ts +22 -22
- package/lib/lib.es5.d.ts +49 -49
- package/lib/lib.esnext.d.ts +1 -0
- package/lib/lib.esnext.float16.d.ts +443 -0
- package/lib/lib.esnext.iterator.d.ts +1 -1
- package/lib/typescript.js +13 -2
- package/package.json +2 -2
package/lib/_tsc.js
CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
18
18
|
|
19
19
|
// src/compiler/corePublic.ts
|
20
20
|
var versionMajorMinor = "5.8";
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20250122`;
|
22
22
|
|
23
23
|
// src/compiler/core.ts
|
24
24
|
var emptyArray = [];
|
@@ -13236,6 +13236,9 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
|
|
13236
13236
|
"trunc",
|
13237
13237
|
"fround",
|
13238
13238
|
"cbrt"
|
13239
|
+
],
|
13240
|
+
esnext: [
|
13241
|
+
"f16round"
|
13239
13242
|
]
|
13240
13243
|
})),
|
13241
13244
|
Map: new Map(Object.entries({
|
@@ -13405,6 +13408,10 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
|
|
13405
13408
|
"setBigUint64",
|
13406
13409
|
"getBigInt64",
|
13407
13410
|
"getBigUint64"
|
13411
|
+
],
|
13412
|
+
esnext: [
|
13413
|
+
"setFloat16",
|
13414
|
+
"getFloat16"
|
13408
13415
|
]
|
13409
13416
|
})),
|
13410
13417
|
BigInt: new Map(Object.entries({
|
@@ -13508,6 +13515,9 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
|
|
13508
13515
|
"with"
|
13509
13516
|
]
|
13510
13517
|
})),
|
13518
|
+
Float16Array: new Map(Object.entries({
|
13519
|
+
esnext: emptyArray
|
13520
|
+
})),
|
13511
13521
|
Float32Array: new Map(Object.entries({
|
13512
13522
|
es2022: [
|
13513
13523
|
"at"
|
@@ -36256,6 +36266,7 @@ var libEntries = [
|
|
36256
36266
|
["esnext.string", "lib.es2024.string.d.ts"],
|
36257
36267
|
["esnext.iterator", "lib.esnext.iterator.d.ts"],
|
36258
36268
|
["esnext.promise", "lib.esnext.promise.d.ts"],
|
36269
|
+
["esnext.float16", "lib.esnext.float16.d.ts"],
|
36259
36270
|
["decorators", "lib.decorators.d.ts"],
|
36260
36271
|
["decorators.legacy", "lib.decorators.legacy.d.ts"]
|
36261
36272
|
];
|
@@ -41545,7 +41556,7 @@ function loadModuleFromNearestNodeModulesDirectoryTypesScope(moduleName, directo
|
|
41545
41556
|
);
|
41546
41557
|
}
|
41547
41558
|
function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) {
|
41548
|
-
const mode = state.features === 0 ? void 0 : state.features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */;
|
41559
|
+
const mode = state.features === 0 ? void 0 : state.features & 32 /* EsmMode */ || state.conditions.includes("import") ? 99 /* ESNext */ : 1 /* CommonJS */;
|
41549
41560
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
41550
41561
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
41551
41562
|
if (priorityExtensions) {
|
@@ -196,10 +196,12 @@ interface SetIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknow
|
|
196
196
|
interface Set<T> {
|
197
197
|
/** Iterates over values in the set. */
|
198
198
|
[Symbol.iterator](): SetIterator<T>;
|
199
|
+
|
199
200
|
/**
|
200
201
|
* Returns an iterable of [v,v] pairs for every value `v` in the set.
|
201
202
|
*/
|
202
203
|
entries(): SetIterator<[T, T]>;
|
204
|
+
|
203
205
|
/**
|
204
206
|
* Despite its name, returns an iterable of the values in the set.
|
205
207
|
*/
|
@@ -272,14 +274,17 @@ interface String {
|
|
272
274
|
|
273
275
|
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
|
274
276
|
[Symbol.iterator](): ArrayIterator<number>;
|
277
|
+
|
275
278
|
/**
|
276
279
|
* Returns an array of key, value pairs for every entry in the array
|
277
280
|
*/
|
278
281
|
entries(): ArrayIterator<[number, number]>;
|
282
|
+
|
279
283
|
/**
|
280
284
|
* Returns an list of keys in the array
|
281
285
|
*/
|
282
286
|
keys(): ArrayIterator<number>;
|
287
|
+
|
283
288
|
/**
|
284
289
|
* Returns an list of values in the array
|
285
290
|
*/
|
@@ -291,30 +296,32 @@ interface Int8ArrayConstructor {
|
|
291
296
|
|
292
297
|
/**
|
293
298
|
* Creates an array from an array-like or iterable object.
|
294
|
-
* @param
|
295
|
-
* @param mapfn A mapping function to call on every element of the array.
|
296
|
-
* @param thisArg Value of 'this' used to invoke the mapfn.
|
299
|
+
* @param elements An iterable object to convert to an array.
|
297
300
|
*/
|
298
|
-
from(
|
301
|
+
from(elements: Iterable<number>): Int8Array<ArrayBuffer>;
|
302
|
+
|
299
303
|
/**
|
300
304
|
* Creates an array from an array-like or iterable object.
|
301
|
-
* @param
|
305
|
+
* @param elements An iterable object to convert to an array.
|
302
306
|
* @param mapfn A mapping function to call on every element of the array.
|
303
307
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
304
308
|
*/
|
305
|
-
from<T>(
|
309
|
+
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array<ArrayBuffer>;
|
306
310
|
}
|
307
311
|
|
308
312
|
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
309
313
|
[Symbol.iterator](): ArrayIterator<number>;
|
314
|
+
|
310
315
|
/**
|
311
316
|
* Returns an array of key, value pairs for every entry in the array
|
312
317
|
*/
|
313
318
|
entries(): ArrayIterator<[number, number]>;
|
319
|
+
|
314
320
|
/**
|
315
321
|
* Returns an list of keys in the array
|
316
322
|
*/
|
317
323
|
keys(): ArrayIterator<number>;
|
324
|
+
|
318
325
|
/**
|
319
326
|
* Returns an list of values in the array
|
320
327
|
*/
|
@@ -326,22 +333,22 @@ interface Uint8ArrayConstructor {
|
|
326
333
|
|
327
334
|
/**
|
328
335
|
* Creates an array from an array-like or iterable object.
|
329
|
-
* @param
|
330
|
-
* @param mapfn A mapping function to call on every element of the array.
|
331
|
-
* @param thisArg Value of 'this' used to invoke the mapfn.
|
336
|
+
* @param elements An iterable object to convert to an array.
|
332
337
|
*/
|
333
|
-
from(
|
338
|
+
from(elements: Iterable<number>): Uint8Array<ArrayBuffer>;
|
339
|
+
|
334
340
|
/**
|
335
341
|
* Creates an array from an array-like or iterable object.
|
336
|
-
* @param
|
342
|
+
* @param elements An iterable object to convert to an array.
|
337
343
|
* @param mapfn A mapping function to call on every element of the array.
|
338
344
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
339
345
|
*/
|
340
|
-
from<T>(
|
346
|
+
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
|
341
347
|
}
|
342
348
|
|
343
349
|
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
|
344
350
|
[Symbol.iterator](): ArrayIterator<number>;
|
351
|
+
|
345
352
|
/**
|
346
353
|
* Returns an array of key, value pairs for every entry in the array
|
347
354
|
*/
|
@@ -363,18 +370,17 @@ interface Uint8ClampedArrayConstructor {
|
|
363
370
|
|
364
371
|
/**
|
365
372
|
* Creates an array from an array-like or iterable object.
|
366
|
-
* @param
|
367
|
-
* @param mapfn A mapping function to call on every element of the array.
|
368
|
-
* @param thisArg Value of 'this' used to invoke the mapfn.
|
373
|
+
* @param elements An iterable object to convert to an array.
|
369
374
|
*/
|
370
|
-
from(
|
375
|
+
from(elements: Iterable<number>): Uint8ClampedArray<ArrayBuffer>;
|
376
|
+
|
371
377
|
/**
|
372
378
|
* Creates an array from an array-like or iterable object.
|
373
|
-
* @param
|
379
|
+
* @param elements An iterable object to convert to an array.
|
374
380
|
* @param mapfn A mapping function to call on every element of the array.
|
375
381
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
376
382
|
*/
|
377
|
-
from<T>(
|
383
|
+
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray<ArrayBuffer>;
|
378
384
|
}
|
379
385
|
|
380
386
|
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
|
@@ -400,30 +406,32 @@ interface Int16ArrayConstructor {
|
|
400
406
|
|
401
407
|
/**
|
402
408
|
* Creates an array from an array-like or iterable object.
|
403
|
-
* @param
|
404
|
-
* @param mapfn A mapping function to call on every element of the array.
|
405
|
-
* @param thisArg Value of 'this' used to invoke the mapfn.
|
409
|
+
* @param elements An iterable object to convert to an array.
|
406
410
|
*/
|
407
|
-
from(
|
411
|
+
from(elements: Iterable<number>): Int16Array<ArrayBuffer>;
|
412
|
+
|
408
413
|
/**
|
409
414
|
* Creates an array from an array-like or iterable object.
|
410
|
-
* @param
|
415
|
+
* @param elements An iterable object to convert to an array.
|
411
416
|
* @param mapfn A mapping function to call on every element of the array.
|
412
417
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
413
418
|
*/
|
414
|
-
from<T>(
|
419
|
+
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array<ArrayBuffer>;
|
415
420
|
}
|
416
421
|
|
417
422
|
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
|
418
423
|
[Symbol.iterator](): ArrayIterator<number>;
|
424
|
+
|
419
425
|
/**
|
420
426
|
* Returns an array of key, value pairs for every entry in the array
|
421
427
|
*/
|
422
428
|
entries(): ArrayIterator<[number, number]>;
|
429
|
+
|
423
430
|
/**
|
424
431
|
* Returns an list of keys in the array
|
425
432
|
*/
|
426
433
|
keys(): ArrayIterator<number>;
|
434
|
+
|
427
435
|
/**
|
428
436
|
* Returns an list of values in the array
|
429
437
|
*/
|
@@ -435,30 +443,32 @@ interface Uint16ArrayConstructor {
|
|
435
443
|
|
436
444
|
/**
|
437
445
|
* Creates an array from an array-like or iterable object.
|
438
|
-
* @param
|
439
|
-
* @param mapfn A mapping function to call on every element of the array.
|
440
|
-
* @param thisArg Value of 'this' used to invoke the mapfn.
|
446
|
+
* @param elements An iterable object to convert to an array.
|
441
447
|
*/
|
442
|
-
from(
|
448
|
+
from(elements: Iterable<number>): Uint16Array<ArrayBuffer>;
|
449
|
+
|
443
450
|
/**
|
444
451
|
* Creates an array from an array-like or iterable object.
|
445
|
-
* @param
|
452
|
+
* @param elements An iterable object to convert to an array.
|
446
453
|
* @param mapfn A mapping function to call on every element of the array.
|
447
454
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
448
455
|
*/
|
449
|
-
from<T>(
|
456
|
+
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array<ArrayBuffer>;
|
450
457
|
}
|
451
458
|
|
452
459
|
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
|
453
460
|
[Symbol.iterator](): ArrayIterator<number>;
|
461
|
+
|
454
462
|
/**
|
455
463
|
* Returns an array of key, value pairs for every entry in the array
|
456
464
|
*/
|
457
465
|
entries(): ArrayIterator<[number, number]>;
|
466
|
+
|
458
467
|
/**
|
459
468
|
* Returns an list of keys in the array
|
460
469
|
*/
|
461
470
|
keys(): ArrayIterator<number>;
|
471
|
+
|
462
472
|
/**
|
463
473
|
* Returns an list of values in the array
|
464
474
|
*/
|
@@ -470,30 +480,32 @@ interface Int32ArrayConstructor {
|
|
470
480
|
|
471
481
|
/**
|
472
482
|
* Creates an array from an array-like or iterable object.
|
473
|
-
* @param
|
474
|
-
* @param mapfn A mapping function to call on every element of the array.
|
475
|
-
* @param thisArg Value of 'this' used to invoke the mapfn.
|
483
|
+
* @param elements An iterable object to convert to an array.
|
476
484
|
*/
|
477
|
-
from(
|
485
|
+
from(elements: Iterable<number>): Int32Array<ArrayBuffer>;
|
486
|
+
|
478
487
|
/**
|
479
488
|
* Creates an array from an array-like or iterable object.
|
480
|
-
* @param
|
489
|
+
* @param elements An iterable object to convert to an array.
|
481
490
|
* @param mapfn A mapping function to call on every element of the array.
|
482
491
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
483
492
|
*/
|
484
|
-
from<T>(
|
493
|
+
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array<ArrayBuffer>;
|
485
494
|
}
|
486
495
|
|
487
496
|
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
|
488
497
|
[Symbol.iterator](): ArrayIterator<number>;
|
498
|
+
|
489
499
|
/**
|
490
500
|
* Returns an array of key, value pairs for every entry in the array
|
491
501
|
*/
|
492
502
|
entries(): ArrayIterator<[number, number]>;
|
503
|
+
|
493
504
|
/**
|
494
505
|
* Returns an list of keys in the array
|
495
506
|
*/
|
496
507
|
keys(): ArrayIterator<number>;
|
508
|
+
|
497
509
|
/**
|
498
510
|
* Returns an list of values in the array
|
499
511
|
*/
|
@@ -505,30 +517,32 @@ interface Uint32ArrayConstructor {
|
|
505
517
|
|
506
518
|
/**
|
507
519
|
* Creates an array from an array-like or iterable object.
|
508
|
-
* @param
|
509
|
-
* @param mapfn A mapping function to call on every element of the array.
|
510
|
-
* @param thisArg Value of 'this' used to invoke the mapfn.
|
520
|
+
* @param elements An iterable object to convert to an array.
|
511
521
|
*/
|
512
|
-
from(
|
522
|
+
from(elements: Iterable<number>): Uint32Array<ArrayBuffer>;
|
523
|
+
|
513
524
|
/**
|
514
525
|
* Creates an array from an array-like or iterable object.
|
515
|
-
* @param
|
526
|
+
* @param elements An iterable object to convert to an array.
|
516
527
|
* @param mapfn A mapping function to call on every element of the array.
|
517
528
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
518
529
|
*/
|
519
|
-
from<T>(
|
530
|
+
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array<ArrayBuffer>;
|
520
531
|
}
|
521
532
|
|
522
533
|
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
|
523
534
|
[Symbol.iterator](): ArrayIterator<number>;
|
535
|
+
|
524
536
|
/**
|
525
537
|
* Returns an array of key, value pairs for every entry in the array
|
526
538
|
*/
|
527
539
|
entries(): ArrayIterator<[number, number]>;
|
540
|
+
|
528
541
|
/**
|
529
542
|
* Returns an list of keys in the array
|
530
543
|
*/
|
531
544
|
keys(): ArrayIterator<number>;
|
545
|
+
|
532
546
|
/**
|
533
547
|
* Returns an list of values in the array
|
534
548
|
*/
|
@@ -540,30 +554,32 @@ interface Float32ArrayConstructor {
|
|
540
554
|
|
541
555
|
/**
|
542
556
|
* Creates an array from an array-like or iterable object.
|
543
|
-
* @param
|
544
|
-
* @param mapfn A mapping function to call on every element of the array.
|
545
|
-
* @param thisArg Value of 'this' used to invoke the mapfn.
|
557
|
+
* @param elements An iterable object to convert to an array.
|
546
558
|
*/
|
547
|
-
from(
|
559
|
+
from(elements: Iterable<number>): Float32Array<ArrayBuffer>;
|
560
|
+
|
548
561
|
/**
|
549
562
|
* Creates an array from an array-like or iterable object.
|
550
|
-
* @param
|
563
|
+
* @param elements An iterable object to convert to an array.
|
551
564
|
* @param mapfn A mapping function to call on every element of the array.
|
552
565
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
553
566
|
*/
|
554
|
-
from<T>(
|
567
|
+
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array<ArrayBuffer>;
|
555
568
|
}
|
556
569
|
|
557
570
|
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
|
558
571
|
[Symbol.iterator](): ArrayIterator<number>;
|
572
|
+
|
559
573
|
/**
|
560
574
|
* Returns an array of key, value pairs for every entry in the array
|
561
575
|
*/
|
562
576
|
entries(): ArrayIterator<[number, number]>;
|
577
|
+
|
563
578
|
/**
|
564
579
|
* Returns an list of keys in the array
|
565
580
|
*/
|
566
581
|
keys(): ArrayIterator<number>;
|
582
|
+
|
567
583
|
/**
|
568
584
|
* Returns an list of values in the array
|
569
585
|
*/
|
@@ -575,16 +591,15 @@ interface Float64ArrayConstructor {
|
|
575
591
|
|
576
592
|
/**
|
577
593
|
* Creates an array from an array-like or iterable object.
|
578
|
-
* @param
|
579
|
-
* @param mapfn A mapping function to call on every element of the array.
|
580
|
-
* @param thisArg Value of 'this' used to invoke the mapfn.
|
594
|
+
* @param elements An iterable object to convert to an array.
|
581
595
|
*/
|
582
|
-
from(
|
596
|
+
from(elements: Iterable<number>): Float64Array<ArrayBuffer>;
|
597
|
+
|
583
598
|
/**
|
584
599
|
* Creates an array from an array-like or iterable object.
|
585
|
-
* @param
|
600
|
+
* @param elements An iterable object to convert to an array.
|
586
601
|
* @param mapfn A mapping function to call on every element of the array.
|
587
602
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
588
603
|
*/
|
589
|
-
from<T>(
|
604
|
+
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array<ArrayBuffer>;
|
590
605
|
}
|
@@ -405,18 +405,31 @@ interface BigInt64ArrayConstructor {
|
|
405
405
|
|
406
406
|
/**
|
407
407
|
* Creates an array from an array-like or iterable object.
|
408
|
-
* @param arrayLike An array-like
|
409
|
-
* @param mapfn A mapping function to call on every element of the array.
|
410
|
-
* @param thisArg Value of 'this' used to invoke the mapfn.
|
408
|
+
* @param arrayLike An array-like object to convert to an array.
|
411
409
|
*/
|
412
410
|
from(arrayLike: ArrayLike<bigint>): BigInt64Array<ArrayBuffer>;
|
411
|
+
|
413
412
|
/**
|
414
413
|
* Creates an array from an array-like or iterable object.
|
415
|
-
* @param arrayLike An array-like
|
414
|
+
* @param arrayLike An array-like object to convert to an array.
|
416
415
|
* @param mapfn A mapping function to call on every element of the array.
|
417
416
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
418
417
|
*/
|
419
418
|
from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array<ArrayBuffer>;
|
419
|
+
|
420
|
+
/**
|
421
|
+
* Creates an array from an array-like or iterable object.
|
422
|
+
* @param elements An iterable object to convert to an array.
|
423
|
+
*/
|
424
|
+
from(elements: Iterable<bigint>): BigInt64Array<ArrayBuffer>;
|
425
|
+
|
426
|
+
/**
|
427
|
+
* Creates an array from an array-like or iterable object.
|
428
|
+
* @param elements An iterable object to convert to an array.
|
429
|
+
* @param mapfn A mapping function to call on every element of the array.
|
430
|
+
* @param thisArg Value of 'this' used to invoke the mapfn.
|
431
|
+
*/
|
432
|
+
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array<ArrayBuffer>;
|
420
433
|
}
|
421
434
|
declare var BigInt64Array: BigInt64ArrayConstructor;
|
422
435
|
|
@@ -683,12 +696,31 @@ interface BigUint64ArrayConstructor {
|
|
683
696
|
|
684
697
|
/**
|
685
698
|
* Creates an array from an array-like or iterable object.
|
686
|
-
* @param arrayLike An array-like
|
699
|
+
* @param arrayLike An array-like object to convert to an array.
|
700
|
+
*/
|
701
|
+
from(arrayLike: ArrayLike<bigint>): BigUint64Array<ArrayBuffer>;
|
702
|
+
|
703
|
+
/**
|
704
|
+
* Creates an array from an array-like or iterable object.
|
705
|
+
* @param arrayLike An array-like object to convert to an array.
|
687
706
|
* @param mapfn A mapping function to call on every element of the array.
|
688
707
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
689
708
|
*/
|
690
|
-
from(arrayLike: ArrayLike<bigint>): BigUint64Array<ArrayBuffer>;
|
691
709
|
from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array<ArrayBuffer>;
|
710
|
+
|
711
|
+
/**
|
712
|
+
* Creates an array from an array-like or iterable object.
|
713
|
+
* @param elements An iterable object to convert to an array.
|
714
|
+
*/
|
715
|
+
from(elements: Iterable<bigint>): BigUint64Array<ArrayBuffer>;
|
716
|
+
|
717
|
+
/**
|
718
|
+
* Creates an array from an array-like or iterable object.
|
719
|
+
* @param elements An iterable object to convert to an array.
|
720
|
+
* @param mapfn A mapping function to call on every element of the array.
|
721
|
+
* @param thisArg Value of 'this' used to invoke the mapfn.
|
722
|
+
*/
|
723
|
+
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array<ArrayBuffer>;
|
692
724
|
}
|
693
725
|
declare var BigUint64Array: BigUint64ArrayConstructor;
|
694
726
|
|
@@ -211,8 +211,8 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
211
211
|
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
212
212
|
* value otherwise. If omitted, the elements are sorted in ascending order.
|
213
213
|
* ```ts
|
214
|
-
* const myNums = Int8Array
|
215
|
-
* myNums.toSorted((a, b) => a - b) // Int8Array
|
214
|
+
* const myNums = Int8Array.from([11, 2, 22, 1]);
|
215
|
+
* myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22]
|
216
216
|
* ```
|
217
217
|
*/
|
218
218
|
toSorted(compareFn?: (a: number, b: number) => number): Int8Array<ArrayBuffer>;
|
@@ -275,8 +275,8 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
275
275
|
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
276
276
|
* value otherwise. If omitted, the elements are sorted in ascending order.
|
277
277
|
* ```ts
|
278
|
-
* const myNums = Uint8Array
|
279
|
-
* myNums.toSorted((a, b) => a - b) // Uint8Array
|
278
|
+
* const myNums = Uint8Array.from([11, 2, 22, 1]);
|
279
|
+
* myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22]
|
280
280
|
* ```
|
281
281
|
*/
|
282
282
|
toSorted(compareFn?: (a: number, b: number) => number): Uint8Array<ArrayBuffer>;
|
@@ -347,8 +347,8 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
|
|
347
347
|
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
348
348
|
* value otherwise. If omitted, the elements are sorted in ascending order.
|
349
349
|
* ```ts
|
350
|
-
* const myNums = Uint8ClampedArray
|
351
|
-
* myNums.toSorted((a, b) => a - b) // Uint8ClampedArray
|
350
|
+
* const myNums = Uint8ClampedArray.from([11, 2, 22, 1]);
|
351
|
+
* myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22]
|
352
352
|
* ```
|
353
353
|
*/
|
354
354
|
toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray<ArrayBuffer>;
|
@@ -411,8 +411,8 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
411
411
|
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
412
412
|
* value otherwise. If omitted, the elements are sorted in ascending order.
|
413
413
|
* ```ts
|
414
|
-
* const myNums = Int16Array
|
415
|
-
* myNums.toSorted((a, b) => a - b) // Int16Array
|
414
|
+
* const myNums = Int16Array.from([11, 2, -22, 1]);
|
415
|
+
* myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11]
|
416
416
|
* ```
|
417
417
|
*/
|
418
418
|
toSorted(compareFn?: (a: number, b: number) => number): Int16Array<ArrayBuffer>;
|
@@ -483,8 +483,8 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
483
483
|
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
484
484
|
* value otherwise. If omitted, the elements are sorted in ascending order.
|
485
485
|
* ```ts
|
486
|
-
* const myNums = Uint16Array
|
487
|
-
* myNums.toSorted((a, b) => a - b) // Uint16Array
|
486
|
+
* const myNums = Uint16Array.from([11, 2, 22, 1]);
|
487
|
+
* myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22]
|
488
488
|
* ```
|
489
489
|
*/
|
490
490
|
toSorted(compareFn?: (a: number, b: number) => number): Uint16Array<ArrayBuffer>;
|
@@ -547,8 +547,8 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
547
547
|
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
548
548
|
* value otherwise. If omitted, the elements are sorted in ascending order.
|
549
549
|
* ```ts
|
550
|
-
* const myNums = Int32Array
|
551
|
-
* myNums.toSorted((a, b) => a - b) // Int32Array
|
550
|
+
* const myNums = Int32Array.from([11, 2, -22, 1]);
|
551
|
+
* myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11]
|
552
552
|
* ```
|
553
553
|
*/
|
554
554
|
toSorted(compareFn?: (a: number, b: number) => number): Int32Array<ArrayBuffer>;
|
@@ -619,8 +619,8 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
619
619
|
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
620
620
|
* value otherwise. If omitted, the elements are sorted in ascending order.
|
621
621
|
* ```ts
|
622
|
-
* const myNums = Uint32Array
|
623
|
-
* myNums.toSorted((a, b) => a - b) // Uint32Array
|
622
|
+
* const myNums = Uint32Array.from([11, 2, 22, 1]);
|
623
|
+
* myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22]
|
624
624
|
* ```
|
625
625
|
*/
|
626
626
|
toSorted(compareFn?: (a: number, b: number) => number): Uint32Array<ArrayBuffer>;
|
@@ -691,8 +691,8 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
691
691
|
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
692
692
|
* value otherwise. If omitted, the elements are sorted in ascending order.
|
693
693
|
* ```ts
|
694
|
-
* const myNums = Float32Array
|
695
|
-
* myNums.toSorted((a, b) => a - b) // Float32Array
|
694
|
+
* const myNums = Float32Array.from([11.25, 2, -22.5, 1]);
|
695
|
+
* myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5]
|
696
696
|
* ```
|
697
697
|
*/
|
698
698
|
toSorted(compareFn?: (a: number, b: number) => number): Float32Array<ArrayBuffer>;
|
@@ -763,8 +763,8 @@ interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
763
763
|
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
764
764
|
* value otherwise. If omitted, the elements are sorted in ascending order.
|
765
765
|
* ```ts
|
766
|
-
* const myNums = Float64Array
|
767
|
-
* myNums.toSorted((a, b) => a - b) // Float64Array
|
766
|
+
* const myNums = Float64Array.from([11.25, 2, -22.5, 1]);
|
767
|
+
* myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5]
|
768
768
|
* ```
|
769
769
|
*/
|
770
770
|
toSorted(compareFn?: (a: number, b: number) => number): Float64Array<ArrayBuffer>;
|
@@ -835,8 +835,8 @@ interface BigInt64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
835
835
|
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
836
836
|
* value otherwise. If omitted, the elements are sorted in ascending order.
|
837
837
|
* ```ts
|
838
|
-
* const myNums = BigInt64Array
|
839
|
-
* myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array
|
838
|
+
* const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]);
|
839
|
+
* myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n]
|
840
840
|
* ```
|
841
841
|
*/
|
842
842
|
toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array<ArrayBuffer>;
|
@@ -907,8 +907,8 @@ interface BigUint64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
907
907
|
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
908
908
|
* value otherwise. If omitted, the elements are sorted in ascending order.
|
909
909
|
* ```ts
|
910
|
-
* const myNums = BigUint64Array
|
911
|
-
* myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array
|
910
|
+
* const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]);
|
911
|
+
* myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n]
|
912
912
|
* ```
|
913
913
|
*/
|
914
914
|
toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array<ArrayBuffer>;
|