1
- import { AsyncIterator } from "internal/webstreams/util" ;
2
-
3
1
type UncurryThis < T extends ( this : unknown , ...args : unknown [ ] ) => unknown > =
4
2
( self : ThisParameterType < T > , ...args : Parameters < T > ) => ReturnType < T > ;
5
3
type UncurryThisStaticApply < T extends ( this : unknown , ...args : unknown [ ] ) => unknown > =
6
4
( self : ThisParameterType < T > , args : Parameters < T > ) => ReturnType < T > ;
7
5
type StaticApply < T extends ( this : unknown , ...args : unknown [ ] ) => unknown > =
8
6
( args : Parameters < T > ) => ReturnType < T > ;
9
7
8
+ type UncurryMethod < O , K extends keyof O , T = O > =
9
+ O [ K ] extends ( this : infer U , ...args : infer A ) => infer R
10
+ ? ( self : unknown extends U ? T : U , ...args : A ) => R
11
+ : never ;
12
+ type UncurryMethodApply < O , K extends keyof O , T = O > =
13
+ O [ K ] extends ( this : infer U , ...args : infer A ) => infer R
14
+ ? ( self : unknown extends U ? T : U , args : A ) => R
15
+ : never ;
16
+
17
+ type UncurryGetter < O , K extends keyof O , T = O > =
18
+ O [ K ] extends infer V ? ( self : T ) => V : never ;
19
+ type UncurrySetter < O , K extends keyof O , T = O > =
20
+ O [ K ] extends infer V ? ( self : T , value : V ) => void : never ;
21
+
22
+ type TypedArrayContentType < T extends TypedArray > = T extends { [ k : number ] : infer V } ? V : never ;
23
+
10
24
/**
11
25
* Primordials are a way to safely use globals without fear of global mutation
12
26
* Generally, this means removing `this` parameter usage and instead using
@@ -24,17 +38,14 @@ type StaticApply<T extends (this: unknown, ...args: unknown[]) => unknown> =
24
38
* primordials.StringPrototypeStartsWith('thing', 'hello')
25
39
* ```
26
40
*/
27
- declare namespace Primordials {
28
- export function uncurryThis <
29
- T extends ( ...args : unknown [ ] ) => unknown
30
- > ( fn : T ) :
31
- ( self : ThisType < T > , ...args : Parameters < T > ) => ReturnType < T > ;
41
+ declare namespace primordials {
42
+ export function uncurryThis < T extends ( ...args : unknown [ ] ) => unknown > ( fn : T ) : UncurryThis < T > ;
32
43
export function makeSafe < T extends NewableFunction > ( unsafe : NewableFunction , safe : T ) : T ;
33
44
34
- export const decodeURI : typeof globalThis . decodeURI ;
35
- export const decodeURIComponent : typeof globalThis . decodeURIComponent ;
36
- export const encodeURI : typeof globalThis . encodeURI ;
37
- export const encodeURIComponent : typeof globalThis . encodeURIComponent ;
45
+ export import decodeURI = globalThis . decodeURI ;
46
+ export import decodeURIComponent = globalThis . decodeURIComponent ;
47
+ export import encodeURI = globalThis . encodeURI ;
48
+ export import encodeURIComponent = globalThis . encodeURIComponent ;
38
49
export const JSONParse : typeof JSON . parse
39
50
export const JSONStringify : typeof JSON . stringify
40
51
export const MathAbs : typeof Math . abs
@@ -94,11 +105,11 @@ declare namespace Primordials {
94
105
export const ReflectPreventExtensions : typeof Reflect . preventExtensions
95
106
export const ReflectSet : typeof Reflect . set
96
107
export const ReflectSetPrototypeOf : typeof Reflect . setPrototypeOf
97
- export const AggregateError : typeof globalThis . AggregateError ;
108
+ export import AggregateError = globalThis . AggregateError ;
98
109
export const AggregateErrorLength : typeof AggregateError . length
99
110
export const AggregateErrorName : typeof AggregateError . name
100
111
export const AggregateErrorPrototype : typeof AggregateError . prototype
101
- export const Array : typeof globalThis . Array ;
112
+ export import Array = globalThis . Array ;
102
113
export const ArrayLength : typeof Array . length
103
114
export const ArrayName : typeof Array . name
104
115
export const ArrayPrototype : typeof Array . prototype
@@ -138,14 +149,15 @@ declare namespace Primordials {
138
149
export const ArrayPrototypeReduceRight : UncurryThis < typeof Array . prototype . reduceRight >
139
150
export const ArrayPrototypeToLocaleString : UncurryThis < typeof Array . prototype . toLocaleString >
140
151
export const ArrayPrototypeToString : UncurryThis < typeof Array . prototype . toString >
141
- export const ArrayBuffer : typeof globalThis . ArrayBuffer ;
152
+ export const ArrayPrototypeSymbolIterator : UncurryMethod < typeof Array . prototype , typeof Symbol . iterator > ;
153
+ export import ArrayBuffer = globalThis . ArrayBuffer ;
142
154
export const ArrayBufferLength : typeof ArrayBuffer . length
143
155
export const ArrayBufferName : typeof ArrayBuffer . name
144
156
export const ArrayBufferPrototype : typeof ArrayBuffer . prototype
145
157
export const ArrayBufferIsView : typeof ArrayBuffer . isView
146
158
export const ArrayBufferPrototypeSlice : UncurryThis < typeof ArrayBuffer . prototype . slice >
147
- export const AsyncIteratorPrototype : UncurryThis < typeof AsyncIterator >
148
- export const BigInt : typeof globalThis . BigInt ;
159
+ export const AsyncIteratorPrototype : AsyncIterable < any > ;
160
+ export import BigInt = globalThis . BigInt ;
149
161
export const BigIntLength : typeof BigInt . length
150
162
export const BigIntName : typeof BigInt . name
151
163
export const BigIntPrototype : typeof BigInt . prototype
@@ -154,23 +166,23 @@ declare namespace Primordials {
154
166
export const BigIntPrototypeToLocaleString : UncurryThis < typeof BigInt . prototype . toLocaleString >
155
167
export const BigIntPrototypeToString : UncurryThis < typeof BigInt . prototype . toString >
156
168
export const BigIntPrototypeValueOf : UncurryThis < typeof BigInt . prototype . valueOf >
157
- export const BigInt64Array : typeof globalThis . BigInt64Array ;
169
+ export import BigInt64Array = globalThis . BigInt64Array ;
158
170
export const BigInt64ArrayLength : typeof BigInt64Array . length
159
171
export const BigInt64ArrayName : typeof BigInt64Array . name
160
172
export const BigInt64ArrayPrototype : typeof BigInt64Array . prototype
161
173
export const BigInt64ArrayBYTES_PER_ELEMENT : typeof BigInt64Array . BYTES_PER_ELEMENT
162
- export const BigUint64Array : typeof globalThis . BigUint64Array ;
174
+ export import BigUint64Array = globalThis . BigUint64Array ;
163
175
export const BigUint64ArrayLength : typeof BigUint64Array . length
164
176
export const BigUint64ArrayName : typeof BigUint64Array . name
165
177
export const BigUint64ArrayPrototype : typeof BigUint64Array . prototype
166
178
export const BigUint64ArrayBYTES_PER_ELEMENT : typeof BigUint64Array . BYTES_PER_ELEMENT
167
- export const Boolean : typeof globalThis . Boolean ;
179
+ export import Boolean = globalThis . Boolean ;
168
180
export const BooleanLength : typeof Boolean . length
169
181
export const BooleanName : typeof Boolean . name
170
182
export const BooleanPrototype : typeof Boolean . prototype
171
183
export const BooleanPrototypeToString : UncurryThis < typeof Boolean . prototype . toString >
172
184
export const BooleanPrototypeValueOf : UncurryThis < typeof Boolean . prototype . valueOf >
173
- export const DataView : typeof globalThis . DataView ;
185
+ export import DataView = globalThis . DataView ;
174
186
export const DataViewLength : typeof DataView . length
175
187
export const DataViewName : typeof DataView . name
176
188
export const DataViewPrototype : typeof DataView . prototype
@@ -194,7 +206,10 @@ declare namespace Primordials {
194
206
export const DataViewPrototypeSetBigInt64 : UncurryThis < typeof DataView . prototype . setBigInt64 >
195
207
export const DataViewPrototypeGetBigUint64 : UncurryThis < typeof DataView . prototype . getBigUint64 >
196
208
export const DataViewPrototypeSetBigUint64 : UncurryThis < typeof DataView . prototype . setBigUint64 >
197
- export const Date : typeof globalThis . Date ;
209
+ export const DataViewPrototypeGetBuffer : UncurryGetter < typeof DataView . prototype , "buffer" > ;
210
+ export const DataViewPrototypeGetByteLength : UncurryGetter < typeof DataView . prototype , "byteLength" > ;
211
+ export const DataViewPrototypeGetByteOffset : UncurryGetter < typeof DataView . prototype , "byteOffset" > ;
212
+ export import Date = globalThis . Date ;
198
213
export const DateLength : typeof Date . length
199
214
export const DateName : typeof Date . name
200
215
export const DatePrototype : typeof Date . prototype
@@ -247,51 +262,52 @@ declare namespace Primordials {
247
262
export const DatePrototypeToLocaleString : UncurryThis < typeof Date . prototype . toLocaleString >
248
263
export const DatePrototypeToLocaleDateString : UncurryThis < typeof Date . prototype . toLocaleDateString >
249
264
export const DatePrototypeToLocaleTimeString : UncurryThis < typeof Date . prototype . toLocaleTimeString >
250
- export const Error : typeof globalThis . Error ;
265
+ export const DatePrototypeSymbolToPrimitive : UncurryMethod < typeof Date . prototype , typeof Symbol . toPrimitive > ;
266
+ export import Error = globalThis . Error ;
251
267
export const ErrorLength : typeof Error . length
252
268
export const ErrorName : typeof Error . name
253
269
export const ErrorPrototype : typeof Error . prototype
254
270
export const ErrorCaptureStackTrace : typeof Error . captureStackTrace
255
271
export const ErrorStackTraceLimit : typeof Error . stackTraceLimit
256
272
export const ErrorPrototypeToString : UncurryThis < typeof Error . prototype . toString >
257
- export const EvalError : typeof globalThis . EvalError ;
273
+ export import EvalError = globalThis . EvalError ;
258
274
export const EvalErrorLength : typeof EvalError . length
259
275
export const EvalErrorName : typeof EvalError . name
260
276
export const EvalErrorPrototype : typeof EvalError . prototype
261
- export const Float32Array : typeof globalThis . Float32Array ;
277
+ export import Float32Array = globalThis . Float32Array ;
262
278
export const Float32ArrayLength : typeof Float32Array . length
263
279
export const Float32ArrayName : typeof Float32Array . name
264
280
export const Float32ArrayPrototype : typeof Float32Array . prototype
265
281
export const Float32ArrayBYTES_PER_ELEMENT : typeof Float32Array . BYTES_PER_ELEMENT
266
- export const Float64Array : typeof globalThis . Float64Array ;
282
+ export import Float64Array = globalThis . Float64Array ;
267
283
export const Float64ArrayLength : typeof Float64Array . length
268
284
export const Float64ArrayName : typeof Float64Array . name
269
285
export const Float64ArrayPrototype : typeof Float64Array . prototype
270
286
export const Float64ArrayBYTES_PER_ELEMENT : typeof Float64Array . BYTES_PER_ELEMENT
271
- export const Function : typeof globalThis . Function ;
287
+ export import Function = globalThis . Function ;
272
288
export const FunctionLength : typeof Function . length
273
289
export const FunctionName : typeof Function . name
274
290
export const FunctionPrototype : typeof Function . prototype
275
291
export const FunctionPrototypeApply : UncurryThis < typeof Function . prototype . apply >
276
292
export const FunctionPrototypeBind : UncurryThis < typeof Function . prototype . bind >
277
293
export const FunctionPrototypeCall : UncurryThis < typeof Function . prototype . call >
278
294
export const FunctionPrototypeToString : UncurryThis < typeof Function . prototype . toString >
279
- export const Int16Array : typeof globalThis . Int16Array ;
295
+ export import Int16Array = globalThis . Int16Array ;
280
296
export const Int16ArrayLength : typeof Int16Array . length
281
297
export const Int16ArrayName : typeof Int16Array . name
282
298
export const Int16ArrayPrototype : typeof Int16Array . prototype
283
299
export const Int16ArrayBYTES_PER_ELEMENT : typeof Int16Array . BYTES_PER_ELEMENT
284
- export const Int32Array : typeof globalThis . Int32Array ;
300
+ export import Int32Array = globalThis . Int32Array ;
285
301
export const Int32ArrayLength : typeof Int32Array . length
286
302
export const Int32ArrayName : typeof Int32Array . name
287
303
export const Int32ArrayPrototype : typeof Int32Array . prototype
288
304
export const Int32ArrayBYTES_PER_ELEMENT : typeof Int32Array . BYTES_PER_ELEMENT
289
- export const Int8Array : typeof globalThis . Int8Array ;
305
+ export import Int8Array = globalThis . Int8Array ;
290
306
export const Int8ArrayLength : typeof Int8Array . length
291
307
export const Int8ArrayName : typeof Int8Array . name
292
308
export const Int8ArrayPrototype : typeof Int8Array . prototype
293
309
export const Int8ArrayBYTES_PER_ELEMENT : typeof Int8Array . BYTES_PER_ELEMENT
294
- export const Map : typeof globalThis . Map ;
310
+ export import Map = globalThis . Map ;
295
311
export const MapLength : typeof Map . length
296
312
export const MapName : typeof Map . name
297
313
export const MapPrototype : typeof Map . prototype
@@ -304,7 +320,8 @@ declare namespace Primordials {
304
320
export const MapPrototypeForEach : UncurryThis < typeof Map . prototype . forEach >
305
321
export const MapPrototypeKeys : UncurryThis < typeof Map . prototype . keys >
306
322
export const MapPrototypeValues : UncurryThis < typeof Map . prototype . values >
307
- export const Number : typeof globalThis . Number ;
323
+ export const MapPrototypeGetSize : UncurryGetter < typeof Map . prototype , "size" > ;
324
+ export import Number = globalThis . Number ;
308
325
export const NumberLength : typeof Number . length
309
326
export const NumberName : typeof Number . name
310
327
export const NumberPrototype : typeof Number . prototype
@@ -328,7 +345,7 @@ declare namespace Primordials {
328
345
export const NumberPrototypeToString : UncurryThis < typeof Number . prototype . toString >
329
346
export const NumberPrototypeValueOf : UncurryThis < typeof Number . prototype . valueOf >
330
347
export const NumberPrototypeToLocaleString : UncurryThis < typeof Number . prototype . toLocaleString >
331
- export const Object : typeof globalThis . Object ;
348
+ export import Object = globalThis . Object ;
332
349
export const ObjectLength : typeof Object . length
333
350
export const ObjectName : typeof Object . name
334
351
export const ObjectPrototype : typeof Object . prototype
@@ -363,23 +380,31 @@ declare namespace Primordials {
363
380
export const ObjectPrototypeToString : UncurryThis < typeof Object . prototype . toString >
364
381
export const ObjectPrototypeValueOf : UncurryThis < typeof Object . prototype . valueOf >
365
382
export const ObjectPrototypeToLocaleString : UncurryThis < typeof Object . prototype . toLocaleString >
366
- export const RangeError : typeof globalThis . RangeError ;
383
+ export import RangeError = globalThis . RangeError ;
367
384
export const RangeErrorLength : typeof RangeError . length
368
385
export const RangeErrorName : typeof RangeError . name
369
386
export const RangeErrorPrototype : typeof RangeError . prototype
370
- export const ReferenceError : typeof globalThis . ReferenceError ;
387
+ export import ReferenceError = globalThis . ReferenceError ;
371
388
export const ReferenceErrorLength : typeof ReferenceError . length
372
389
export const ReferenceErrorName : typeof ReferenceError . name
373
390
export const ReferenceErrorPrototype : typeof ReferenceError . prototype
374
- export const RegExp : typeof globalThis . RegExp ;
391
+ export import RegExp = globalThis . RegExp ;
375
392
export const RegExpLength : typeof RegExp . length
376
393
export const RegExpName : typeof RegExp . name
377
394
export const RegExpPrototype : typeof RegExp . prototype
378
395
export const RegExpPrototypeExec : UncurryThis < typeof RegExp . prototype . exec >
379
396
export const RegExpPrototypeCompile : UncurryThis < typeof RegExp . prototype . compile >
380
397
export const RegExpPrototypeToString : UncurryThis < typeof RegExp . prototype . toString >
381
398
export const RegExpPrototypeTest : UncurryThis < typeof RegExp . prototype . test >
382
- export const Set : typeof globalThis . Set ;
399
+ export const RegExpPrototypeGetDotAll : UncurryGetter < typeof RegExp . prototype , "dotAll" > ;
400
+ export const RegExpPrototypeGetFlags : UncurryGetter < typeof RegExp . prototype , "flags" > ;
401
+ export const RegExpPrototypeGetGlobal : UncurryGetter < typeof RegExp . prototype , "global" > ;
402
+ export const RegExpPrototypeGetIgnoreCase : UncurryGetter < typeof RegExp . prototype , "ignoreCase" > ;
403
+ export const RegExpPrototypeGetMultiline : UncurryGetter < typeof RegExp . prototype , "multiline" > ;
404
+ export const RegExpPrototypeGetSource : UncurryGetter < typeof RegExp . prototype , "source" > ;
405
+ export const RegExpPrototypeGetSticky : UncurryGetter < typeof RegExp . prototype , "sticky" > ;
406
+ export const RegExpPrototypeGetUnicode : UncurryGetter < typeof RegExp . prototype , "unicode" > ;
407
+ export import Set = globalThis . Set ;
383
408
export const SetLength : typeof Set . length
384
409
export const SetName : typeof Set . name
385
410
export const SetPrototype : typeof Set . prototype
@@ -391,7 +416,8 @@ declare namespace Primordials {
391
416
export const SetPrototypeForEach : UncurryThis < typeof Set . prototype . forEach >
392
417
export const SetPrototypeValues : UncurryThis < typeof Set . prototype . values >
393
418
export const SetPrototypeKeys : UncurryThis < typeof Set . prototype . keys >
394
- export const String : typeof globalThis . String ;
419
+ export const SetPrototypeGetSize : UncurryGetter < typeof Set . prototype , "size" > ;
420
+ export import String = globalThis . String ;
395
421
export const StringLength : typeof String . length
396
422
export const StringName : typeof String . name
397
423
export const StringPrototype : typeof String . prototype
@@ -445,7 +471,7 @@ declare namespace Primordials {
445
471
export const StringPrototypeToUpperCase : UncurryThis < typeof String . prototype . toUpperCase >
446
472
export const StringPrototypeValueOf : UncurryThis < typeof String . prototype . valueOf >
447
473
export const StringPrototypeReplaceAll : UncurryThis < typeof String . prototype . replaceAll >
448
- export const Symbol : typeof globalThis . Symbol ;
474
+ export import Symbol = globalThis . Symbol ;
449
475
export const SymbolLength : typeof Symbol . length
450
476
export const SymbolName : typeof Symbol . name
451
477
export const SymbolPrototype : typeof Symbol . prototype
@@ -466,54 +492,97 @@ declare namespace Primordials {
466
492
export const SymbolUnscopables : typeof Symbol . unscopables
467
493
export const SymbolPrototypeToString : UncurryThis < typeof Symbol . prototype . toString >
468
494
export const SymbolPrototypeValueOf : UncurryThis < typeof Symbol . prototype . valueOf >
469
- export const SyntaxError : typeof globalThis . SyntaxError ;
495
+ export const SymbolPrototypeSymbolToPrimitive : UncurryMethod < typeof Symbol . prototype , typeof Symbol . toPrimitive , symbol | Symbol > ;
496
+ export const SymbolPrototypeGetDescription : UncurryGetter < typeof Symbol . prototype , "description" , symbol | Symbol > ;
497
+ export import SyntaxError = globalThis . SyntaxError ;
470
498
export const SyntaxErrorLength : typeof SyntaxError . length
471
499
export const SyntaxErrorName : typeof SyntaxError . name
472
500
export const SyntaxErrorPrototype : typeof SyntaxError . prototype
473
- export const TypeError : typeof globalThis . TypeError ;
501
+ export import TypeError = globalThis . TypeError ;
474
502
export const TypeErrorLength : typeof TypeError . length
475
503
export const TypeErrorName : typeof TypeError . name
476
504
export const TypeErrorPrototype : typeof TypeError . prototype
477
- export const URIError : typeof globalThis . URIError ;
505
+ export function TypedArrayFrom < T extends TypedArray > (
506
+ constructor : new ( length : number ) => T ,
507
+ source :
508
+ | Iterable < TypedArrayContentType < T > >
509
+ | ArrayLike < TypedArrayContentType < T > > ,
510
+ ) : T ;
511
+ export function TypedArrayFrom < T extends TypedArray , U , THIS_ARG = undefined > (
512
+ constructor : new ( length : number ) => T ,
513
+ source : Iterable < U > | ArrayLike < U > ,
514
+ mapfn : (
515
+ this : THIS_ARG ,
516
+ value : U ,
517
+ index : number ,
518
+ ) => TypedArrayContentType < T > ,
519
+ thisArg ?: THIS_ARG ,
520
+ ) : T ;
521
+ export function TypedArrayOf < T extends TypedArray > (
522
+ constructor : new ( length : number ) => T ,
523
+ ...items : readonly TypedArrayContentType < T > [ ]
524
+ ) : T ;
525
+ export function TypedArrayOfApply < T extends TypedArray > (
526
+ constructor : new ( length : number ) => T ,
527
+ items : readonly TypedArrayContentType < T > [ ] ,
528
+ ) : T ;
529
+ export const TypedArrayPrototypeGetBuffer : UncurryGetter < TypedArray , "buffer" > ;
530
+ export const TypedArrayPrototypeGetByteLength : UncurryGetter < TypedArray , "byteLength" > ;
531
+ export const TypedArrayPrototypeGetByteOffset : UncurryGetter < TypedArray , "byteOffset" > ;
532
+ export const TypedArrayPrototypeGetLength : UncurryGetter < TypedArray , "length" > ;
533
+ export function TypedArrayPrototypeGetSymbolToStringTag ( self : unknown ) :
534
+ | 'Int8Array'
535
+ | 'Int16Array'
536
+ | 'Int32Array'
537
+ | 'Uint8Array'
538
+ | 'Uint16Array'
539
+ | 'Uint32Array'
540
+ | 'Uint8ClampedArray'
541
+ | 'BigInt64Array'
542
+ | 'BigUint64Array'
543
+ | 'Float32Array'
544
+ | 'Float64Array'
545
+ | undefined ;
546
+ export import URIError = globalThis . URIError ;
478
547
export const URIErrorLength : typeof URIError . length
479
548
export const URIErrorName : typeof URIError . name
480
549
export const URIErrorPrototype : typeof URIError . prototype
481
- export const Uint16Array : typeof globalThis . Uint16Array ;
550
+ export import Uint16Array = globalThis . Uint16Array ;
482
551
export const Uint16ArrayLength : typeof Uint16Array . length
483
552
export const Uint16ArrayName : typeof Uint16Array . name
484
553
export const Uint16ArrayPrototype : typeof Uint16Array . prototype
485
554
export const Uint16ArrayBYTES_PER_ELEMENT : typeof Uint16Array . BYTES_PER_ELEMENT
486
- export const Uint32Array : typeof globalThis . Uint32Array ;
555
+ export import Uint32Array = globalThis . Uint32Array ;
487
556
export const Uint32ArrayLength : typeof Uint32Array . length
488
557
export const Uint32ArrayName : typeof Uint32Array . name
489
558
export const Uint32ArrayPrototype : typeof Uint32Array . prototype
490
559
export const Uint32ArrayBYTES_PER_ELEMENT : typeof Uint32Array . BYTES_PER_ELEMENT
491
- export const Uint8Array : typeof globalThis . Uint8Array ;
560
+ export import Uint8Array = globalThis . Uint8Array ;
492
561
export const Uint8ArrayLength : typeof Uint8Array . length
493
562
export const Uint8ArrayName : typeof Uint8Array . name
494
563
export const Uint8ArrayPrototype : typeof Uint8Array . prototype
495
564
export const Uint8ArrayBYTES_PER_ELEMENT : typeof Uint8Array . BYTES_PER_ELEMENT
496
- export const Uint8ClampedArray : typeof globalThis . Uint8ClampedArray ;
565
+ export import Uint8ClampedArray = globalThis . Uint8ClampedArray ;
497
566
export const Uint8ClampedArrayLength : typeof Uint8ClampedArray . length
498
567
export const Uint8ClampedArrayName : typeof Uint8ClampedArray . name
499
568
export const Uint8ClampedArrayPrototype : typeof Uint8ClampedArray . prototype
500
569
export const Uint8ClampedArrayBYTES_PER_ELEMENT : typeof Uint8ClampedArray . BYTES_PER_ELEMENT
501
- export const WeakMap : typeof globalThis . WeakMap ;
570
+ export import WeakMap = globalThis . WeakMap ;
502
571
export const WeakMapLength : typeof WeakMap . length
503
572
export const WeakMapName : typeof WeakMap . name
504
573
export const WeakMapPrototype : typeof WeakMap . prototype
505
574
export const WeakMapPrototypeDelete : UncurryThis < typeof WeakMap . prototype . delete >
506
575
export const WeakMapPrototypeGet : UncurryThis < typeof WeakMap . prototype . get >
507
576
export const WeakMapPrototypeSet : UncurryThis < typeof WeakMap . prototype . set >
508
577
export const WeakMapPrototypeHas : UncurryThis < typeof WeakMap . prototype . has >
509
- export const WeakSet : typeof globalThis . WeakSet ;
578
+ export import WeakSet = globalThis . WeakSet ;
510
579
export const WeakSetLength : typeof WeakSet . length
511
580
export const WeakSetName : typeof WeakSet . name
512
581
export const WeakSetPrototype : typeof WeakSet . prototype
513
582
export const WeakSetPrototypeDelete : UncurryThis < typeof WeakSet . prototype . delete >
514
583
export const WeakSetPrototypeHas : UncurryThis < typeof WeakSet . prototype . has >
515
584
export const WeakSetPrototypeAdd : UncurryThis < typeof WeakSet . prototype . add >
516
- export const Promise : typeof globalThis . Promise ;
585
+ export import Promise = globalThis . Promise ;
517
586
export const PromiseLength : typeof Promise . length
518
587
export const PromiseName : typeof Promise . name
519
588
export const PromisePrototype : typeof Promise . prototype
@@ -527,7 +596,3 @@ declare namespace Primordials {
527
596
export const PromisePrototypeCatch : UncurryThis < typeof Promise . prototype . catch >
528
597
export const PromisePrototypeFinally : UncurryThis < typeof Promise . prototype . finally >
529
598
}
530
-
531
- declare global {
532
- const primordials : typeof Primordials ;
533
- }
0 commit comments