@typescript/native-preview-darwin-arm64 7.0.0-dev.20250522.2

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.
Files changed (101) hide show
  1. package/LICENSE +55 -0
  2. package/NOTICE.txt +297 -0
  3. package/README.md +3 -0
  4. package/lib/lib.d.ts +22 -0
  5. package/lib/lib.decorators.d.ts +386 -0
  6. package/lib/lib.decorators.legacy.d.ts +22 -0
  7. package/lib/lib.dom.asynciterable.d.ts +41 -0
  8. package/lib/lib.dom.d.ts +28087 -0
  9. package/lib/lib.dom.iterable.d.ts +491 -0
  10. package/lib/lib.es2015.collection.d.ts +147 -0
  11. package/lib/lib.es2015.core.d.ts +597 -0
  12. package/lib/lib.es2015.d.ts +28 -0
  13. package/lib/lib.es2015.generator.d.ts +77 -0
  14. package/lib/lib.es2015.iterable.d.ts +590 -0
  15. package/lib/lib.es2015.promise.d.ts +81 -0
  16. package/lib/lib.es2015.proxy.d.ts +128 -0
  17. package/lib/lib.es2015.reflect.d.ts +144 -0
  18. package/lib/lib.es2015.symbol.d.ts +46 -0
  19. package/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  20. package/lib/lib.es2016.array.include.d.ts +116 -0
  21. package/lib/lib.es2016.d.ts +21 -0
  22. package/lib/lib.es2016.full.d.ts +23 -0
  23. package/lib/lib.es2016.intl.d.ts +31 -0
  24. package/lib/lib.es2017.arraybuffer.d.ts +21 -0
  25. package/lib/lib.es2017.d.ts +26 -0
  26. package/lib/lib.es2017.date.d.ts +31 -0
  27. package/lib/lib.es2017.full.d.ts +23 -0
  28. package/lib/lib.es2017.intl.d.ts +44 -0
  29. package/lib/lib.es2017.object.d.ts +49 -0
  30. package/lib/lib.es2017.sharedmemory.d.ts +135 -0
  31. package/lib/lib.es2017.string.d.ts +45 -0
  32. package/lib/lib.es2017.typedarrays.d.ts +53 -0
  33. package/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  34. package/lib/lib.es2018.asynciterable.d.ts +53 -0
  35. package/lib/lib.es2018.d.ts +24 -0
  36. package/lib/lib.es2018.full.d.ts +24 -0
  37. package/lib/lib.es2018.intl.d.ts +83 -0
  38. package/lib/lib.es2018.promise.d.ts +30 -0
  39. package/lib/lib.es2018.regexp.d.ts +37 -0
  40. package/lib/lib.es2019.array.d.ts +79 -0
  41. package/lib/lib.es2019.d.ts +24 -0
  42. package/lib/lib.es2019.full.d.ts +24 -0
  43. package/lib/lib.es2019.intl.d.ts +23 -0
  44. package/lib/lib.es2019.object.d.ts +33 -0
  45. package/lib/lib.es2019.string.d.ts +37 -0
  46. package/lib/lib.es2019.symbol.d.ts +24 -0
  47. package/lib/lib.es2020.bigint.d.ts +729 -0
  48. package/lib/lib.es2020.d.ts +27 -0
  49. package/lib/lib.es2020.date.d.ts +42 -0
  50. package/lib/lib.es2020.full.d.ts +24 -0
  51. package/lib/lib.es2020.intl.d.ts +474 -0
  52. package/lib/lib.es2020.number.d.ts +28 -0
  53. package/lib/lib.es2020.promise.d.ts +47 -0
  54. package/lib/lib.es2020.sharedmemory.d.ts +99 -0
  55. package/lib/lib.es2020.string.d.ts +44 -0
  56. package/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
  57. package/lib/lib.es2021.d.ts +23 -0
  58. package/lib/lib.es2021.full.d.ts +24 -0
  59. package/lib/lib.es2021.intl.d.ts +166 -0
  60. package/lib/lib.es2021.promise.d.ts +48 -0
  61. package/lib/lib.es2021.string.d.ts +33 -0
  62. package/lib/lib.es2021.weakref.d.ts +78 -0
  63. package/lib/lib.es2022.array.d.ts +121 -0
  64. package/lib/lib.es2022.d.ts +25 -0
  65. package/lib/lib.es2022.error.d.ts +75 -0
  66. package/lib/lib.es2022.full.d.ts +24 -0
  67. package/lib/lib.es2022.intl.d.ts +121 -0
  68. package/lib/lib.es2022.object.d.ts +26 -0
  69. package/lib/lib.es2022.regexp.d.ts +39 -0
  70. package/lib/lib.es2022.string.d.ts +25 -0
  71. package/lib/lib.es2023.array.d.ts +924 -0
  72. package/lib/lib.es2023.collection.d.ts +21 -0
  73. package/lib/lib.es2023.d.ts +22 -0
  74. package/lib/lib.es2023.full.d.ts +24 -0
  75. package/lib/lib.es2023.intl.d.ts +56 -0
  76. package/lib/lib.es2024.arraybuffer.d.ts +65 -0
  77. package/lib/lib.es2024.collection.d.ts +29 -0
  78. package/lib/lib.es2024.d.ts +26 -0
  79. package/lib/lib.es2024.full.d.ts +24 -0
  80. package/lib/lib.es2024.object.d.ts +29 -0
  81. package/lib/lib.es2024.promise.d.ts +35 -0
  82. package/lib/lib.es2024.regexp.d.ts +25 -0
  83. package/lib/lib.es2024.sharedmemory.d.ts +68 -0
  84. package/lib/lib.es2024.string.d.ts +29 -0
  85. package/lib/lib.es5.d.ts +4585 -0
  86. package/lib/lib.es6.d.ts +23 -0
  87. package/lib/lib.esnext.array.d.ts +35 -0
  88. package/lib/lib.esnext.collection.d.ts +96 -0
  89. package/lib/lib.esnext.d.ts +25 -0
  90. package/lib/lib.esnext.decorators.d.ts +28 -0
  91. package/lib/lib.esnext.disposable.d.ts +193 -0
  92. package/lib/lib.esnext.full.d.ts +24 -0
  93. package/lib/lib.esnext.intl.d.ts +21 -0
  94. package/lib/lib.esnext.iterator.d.ts +148 -0
  95. package/lib/lib.scripthost.d.ts +322 -0
  96. package/lib/lib.webworker.asynciterable.d.ts +41 -0
  97. package/lib/lib.webworker.d.ts +9410 -0
  98. package/lib/lib.webworker.importscripts.d.ts +23 -0
  99. package/lib/lib.webworker.iterable.d.ts +288 -0
  100. package/lib/tsgo +0 -0
  101. package/package.json +41 -0
@@ -0,0 +1,590 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ /// <reference lib="es2015.symbol" />
20
+
21
+ interface SymbolConstructor {
22
+ /**
23
+ * A method that returns the default iterator for an object. Called by the semantics of the
24
+ * for-of statement.
25
+ */
26
+ readonly iterator: unique symbol;
27
+ }
28
+
29
+ interface IteratorYieldResult<TYield> {
30
+ done?: false;
31
+ value: TYield;
32
+ }
33
+
34
+ interface IteratorReturnResult<TReturn> {
35
+ done: true;
36
+ value: TReturn;
37
+ }
38
+
39
+ type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
40
+
41
+ interface Iterator<T, TReturn = any, TNext = any> {
42
+ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
43
+ next(...[value]: [] | [TNext]): IteratorResult<T, TReturn>;
44
+ return?(value?: TReturn): IteratorResult<T, TReturn>;
45
+ throw?(e?: any): IteratorResult<T, TReturn>;
46
+ }
47
+
48
+ interface Iterable<T, TReturn = any, TNext = any> {
49
+ [Symbol.iterator](): Iterator<T, TReturn, TNext>;
50
+ }
51
+
52
+ /**
53
+ * Describes a user-defined {@link Iterator} that is also iterable.
54
+ */
55
+ interface IterableIterator<T, TReturn = any, TNext = any> extends Iterator<T, TReturn, TNext> {
56
+ [Symbol.iterator](): IterableIterator<T, TReturn, TNext>;
57
+ }
58
+
59
+ /**
60
+ * Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`.
61
+ */
62
+ interface IteratorObject<T, TReturn = unknown, TNext = unknown> extends Iterator<T, TReturn, TNext> {
63
+ [Symbol.iterator](): IteratorObject<T, TReturn, TNext>;
64
+ }
65
+
66
+ /**
67
+ * Defines the `TReturn` type used for built-in iterators produced by `Array`, `Map`, `Set`, and others.
68
+ * This is `undefined` when `strictBuiltInIteratorReturn` is `true`; otherwise, this is `any`.
69
+ */
70
+ type BuiltinIteratorReturn = intrinsic;
71
+
72
+ interface ArrayIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
73
+ [Symbol.iterator](): ArrayIterator<T>;
74
+ }
75
+
76
+ interface Array<T> {
77
+ /** Iterator */
78
+ [Symbol.iterator](): ArrayIterator<T>;
79
+
80
+ /**
81
+ * Returns an iterable of key, value pairs for every entry in the array
82
+ */
83
+ entries(): ArrayIterator<[number, T]>;
84
+
85
+ /**
86
+ * Returns an iterable of keys in the array
87
+ */
88
+ keys(): ArrayIterator<number>;
89
+
90
+ /**
91
+ * Returns an iterable of values in the array
92
+ */
93
+ values(): ArrayIterator<T>;
94
+ }
95
+
96
+ interface ArrayConstructor {
97
+ /**
98
+ * Creates an array from an iterable object.
99
+ * @param iterable An iterable object to convert to an array.
100
+ */
101
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
102
+
103
+ /**
104
+ * Creates an array from an iterable object.
105
+ * @param iterable An iterable object to convert to an array.
106
+ * @param mapfn A mapping function to call on every element of the array.
107
+ * @param thisArg Value of 'this' used to invoke the mapfn.
108
+ */
109
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
110
+ }
111
+
112
+ interface ReadonlyArray<T> {
113
+ /** Iterator of values in the array. */
114
+ [Symbol.iterator](): ArrayIterator<T>;
115
+
116
+ /**
117
+ * Returns an iterable of key, value pairs for every entry in the array
118
+ */
119
+ entries(): ArrayIterator<[number, T]>;
120
+
121
+ /**
122
+ * Returns an iterable of keys in the array
123
+ */
124
+ keys(): ArrayIterator<number>;
125
+
126
+ /**
127
+ * Returns an iterable of values in the array
128
+ */
129
+ values(): ArrayIterator<T>;
130
+ }
131
+
132
+ interface IArguments {
133
+ /** Iterator */
134
+ [Symbol.iterator](): ArrayIterator<any>;
135
+ }
136
+
137
+ interface MapIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
138
+ [Symbol.iterator](): MapIterator<T>;
139
+ }
140
+
141
+ interface Map<K, V> {
142
+ /** Returns an iterable of entries in the map. */
143
+ [Symbol.iterator](): MapIterator<[K, V]>;
144
+
145
+ /**
146
+ * Returns an iterable of key, value pairs for every entry in the map.
147
+ */
148
+ entries(): MapIterator<[K, V]>;
149
+
150
+ /**
151
+ * Returns an iterable of keys in the map
152
+ */
153
+ keys(): MapIterator<K>;
154
+
155
+ /**
156
+ * Returns an iterable of values in the map
157
+ */
158
+ values(): MapIterator<V>;
159
+ }
160
+
161
+ interface ReadonlyMap<K, V> {
162
+ /** Returns an iterable of entries in the map. */
163
+ [Symbol.iterator](): MapIterator<[K, V]>;
164
+
165
+ /**
166
+ * Returns an iterable of key, value pairs for every entry in the map.
167
+ */
168
+ entries(): MapIterator<[K, V]>;
169
+
170
+ /**
171
+ * Returns an iterable of keys in the map
172
+ */
173
+ keys(): MapIterator<K>;
174
+
175
+ /**
176
+ * Returns an iterable of values in the map
177
+ */
178
+ values(): MapIterator<V>;
179
+ }
180
+
181
+ interface MapConstructor {
182
+ new (): Map<any, any>;
183
+ new <K, V>(iterable?: Iterable<readonly [K, V]> | null): Map<K, V>;
184
+ }
185
+
186
+ interface WeakMap<K extends WeakKey, V> {}
187
+
188
+ interface WeakMapConstructor {
189
+ new <K extends WeakKey, V>(iterable: Iterable<readonly [K, V]>): WeakMap<K, V>;
190
+ }
191
+
192
+ interface SetIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
193
+ [Symbol.iterator](): SetIterator<T>;
194
+ }
195
+
196
+ interface Set<T> {
197
+ /** Iterates over values in the set. */
198
+ [Symbol.iterator](): SetIterator<T>;
199
+ /**
200
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
201
+ */
202
+ entries(): SetIterator<[T, T]>;
203
+ /**
204
+ * Despite its name, returns an iterable of the values in the set.
205
+ */
206
+ keys(): SetIterator<T>;
207
+
208
+ /**
209
+ * Returns an iterable of values in the set.
210
+ */
211
+ values(): SetIterator<T>;
212
+ }
213
+
214
+ interface ReadonlySet<T> {
215
+ /** Iterates over values in the set. */
216
+ [Symbol.iterator](): SetIterator<T>;
217
+
218
+ /**
219
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
220
+ */
221
+ entries(): SetIterator<[T, T]>;
222
+
223
+ /**
224
+ * Despite its name, returns an iterable of the values in the set.
225
+ */
226
+ keys(): SetIterator<T>;
227
+
228
+ /**
229
+ * Returns an iterable of values in the set.
230
+ */
231
+ values(): SetIterator<T>;
232
+ }
233
+
234
+ interface SetConstructor {
235
+ new <T>(iterable?: Iterable<T> | null): Set<T>;
236
+ }
237
+
238
+ interface WeakSet<T extends WeakKey> {}
239
+
240
+ interface WeakSetConstructor {
241
+ new <T extends WeakKey = WeakKey>(iterable: Iterable<T>): WeakSet<T>;
242
+ }
243
+
244
+ interface Promise<T> {}
245
+
246
+ interface PromiseConstructor {
247
+ /**
248
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
249
+ * resolve, or rejected when any Promise is rejected.
250
+ * @param values An iterable of Promises.
251
+ * @returns A new Promise.
252
+ */
253
+ all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
254
+
255
+ /**
256
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
257
+ * or rejected.
258
+ * @param values An iterable of Promises.
259
+ * @returns A new Promise.
260
+ */
261
+ race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
262
+ }
263
+
264
+ interface StringIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
265
+ [Symbol.iterator](): StringIterator<T>;
266
+ }
267
+
268
+ interface String {
269
+ /** Iterator */
270
+ [Symbol.iterator](): StringIterator<string>;
271
+ }
272
+
273
+ interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
274
+ [Symbol.iterator](): ArrayIterator<number>;
275
+ /**
276
+ * Returns an array of key, value pairs for every entry in the array
277
+ */
278
+ entries(): ArrayIterator<[number, number]>;
279
+ /**
280
+ * Returns an list of keys in the array
281
+ */
282
+ keys(): ArrayIterator<number>;
283
+ /**
284
+ * Returns an list of values in the array
285
+ */
286
+ values(): ArrayIterator<number>;
287
+ }
288
+
289
+ interface Int8ArrayConstructor {
290
+ new (elements: Iterable<number>): Int8Array<ArrayBuffer>;
291
+
292
+ /**
293
+ * Creates an array from an array-like or iterable object.
294
+ * @param arrayLike An array-like or iterable object to convert to an array.
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.
297
+ */
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>;
306
+ }
307
+
308
+ interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
309
+ [Symbol.iterator](): ArrayIterator<number>;
310
+ /**
311
+ * Returns an array of key, value pairs for every entry in the array
312
+ */
313
+ entries(): ArrayIterator<[number, number]>;
314
+ /**
315
+ * Returns an list of keys in the array
316
+ */
317
+ keys(): ArrayIterator<number>;
318
+ /**
319
+ * Returns an list of values in the array
320
+ */
321
+ values(): ArrayIterator<number>;
322
+ }
323
+
324
+ interface Uint8ArrayConstructor {
325
+ new (elements: Iterable<number>): Uint8Array<ArrayBuffer>;
326
+
327
+ /**
328
+ * Creates an array from an array-like or iterable object.
329
+ * @param arrayLike An array-like or iterable object to convert to an array.
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.
332
+ */
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>;
341
+ }
342
+
343
+ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
344
+ [Symbol.iterator](): ArrayIterator<number>;
345
+ /**
346
+ * Returns an array of key, value pairs for every entry in the array
347
+ */
348
+ entries(): ArrayIterator<[number, number]>;
349
+
350
+ /**
351
+ * Returns an list of keys in the array
352
+ */
353
+ keys(): ArrayIterator<number>;
354
+
355
+ /**
356
+ * Returns an list of values in the array
357
+ */
358
+ values(): ArrayIterator<number>;
359
+ }
360
+
361
+ interface Uint8ClampedArrayConstructor {
362
+ new (elements: Iterable<number>): Uint8ClampedArray<ArrayBuffer>;
363
+
364
+ /**
365
+ * Creates an array from an array-like or iterable object.
366
+ * @param arrayLike An array-like or iterable object to convert to an array.
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.
369
+ */
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>;
378
+ }
379
+
380
+ interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
381
+ [Symbol.iterator](): ArrayIterator<number>;
382
+ /**
383
+ * Returns an array of key, value pairs for every entry in the array
384
+ */
385
+ entries(): ArrayIterator<[number, number]>;
386
+
387
+ /**
388
+ * Returns an list of keys in the array
389
+ */
390
+ keys(): ArrayIterator<number>;
391
+
392
+ /**
393
+ * Returns an list of values in the array
394
+ */
395
+ values(): ArrayIterator<number>;
396
+ }
397
+
398
+ interface Int16ArrayConstructor {
399
+ new (elements: Iterable<number>): Int16Array<ArrayBuffer>;
400
+
401
+ /**
402
+ * Creates an array from an array-like or iterable object.
403
+ * @param arrayLike An array-like or iterable object to convert to an array.
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.
406
+ */
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>;
415
+ }
416
+
417
+ interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
418
+ [Symbol.iterator](): ArrayIterator<number>;
419
+ /**
420
+ * Returns an array of key, value pairs for every entry in the array
421
+ */
422
+ entries(): ArrayIterator<[number, number]>;
423
+ /**
424
+ * Returns an list of keys in the array
425
+ */
426
+ keys(): ArrayIterator<number>;
427
+ /**
428
+ * Returns an list of values in the array
429
+ */
430
+ values(): ArrayIterator<number>;
431
+ }
432
+
433
+ interface Uint16ArrayConstructor {
434
+ new (elements: Iterable<number>): Uint16Array<ArrayBuffer>;
435
+
436
+ /**
437
+ * Creates an array from an array-like or iterable object.
438
+ * @param arrayLike An array-like or iterable object to convert to an array.
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.
441
+ */
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>;
450
+ }
451
+
452
+ interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
453
+ [Symbol.iterator](): ArrayIterator<number>;
454
+ /**
455
+ * Returns an array of key, value pairs for every entry in the array
456
+ */
457
+ entries(): ArrayIterator<[number, number]>;
458
+ /**
459
+ * Returns an list of keys in the array
460
+ */
461
+ keys(): ArrayIterator<number>;
462
+ /**
463
+ * Returns an list of values in the array
464
+ */
465
+ values(): ArrayIterator<number>;
466
+ }
467
+
468
+ interface Int32ArrayConstructor {
469
+ new (elements: Iterable<number>): Int32Array<ArrayBuffer>;
470
+
471
+ /**
472
+ * Creates an array from an array-like or iterable object.
473
+ * @param arrayLike An array-like or iterable object to convert to an array.
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.
476
+ */
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>;
485
+ }
486
+
487
+ interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
488
+ [Symbol.iterator](): ArrayIterator<number>;
489
+ /**
490
+ * Returns an array of key, value pairs for every entry in the array
491
+ */
492
+ entries(): ArrayIterator<[number, number]>;
493
+ /**
494
+ * Returns an list of keys in the array
495
+ */
496
+ keys(): ArrayIterator<number>;
497
+ /**
498
+ * Returns an list of values in the array
499
+ */
500
+ values(): ArrayIterator<number>;
501
+ }
502
+
503
+ interface Uint32ArrayConstructor {
504
+ new (elements: Iterable<number>): Uint32Array<ArrayBuffer>;
505
+
506
+ /**
507
+ * Creates an array from an array-like or iterable object.
508
+ * @param arrayLike An array-like or iterable object to convert to an array.
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.
511
+ */
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>;
520
+ }
521
+
522
+ interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
523
+ [Symbol.iterator](): ArrayIterator<number>;
524
+ /**
525
+ * Returns an array of key, value pairs for every entry in the array
526
+ */
527
+ entries(): ArrayIterator<[number, number]>;
528
+ /**
529
+ * Returns an list of keys in the array
530
+ */
531
+ keys(): ArrayIterator<number>;
532
+ /**
533
+ * Returns an list of values in the array
534
+ */
535
+ values(): ArrayIterator<number>;
536
+ }
537
+
538
+ interface Float32ArrayConstructor {
539
+ new (elements: Iterable<number>): Float32Array<ArrayBuffer>;
540
+
541
+ /**
542
+ * Creates an array from an array-like or iterable object.
543
+ * @param arrayLike An array-like or iterable object to convert to an array.
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.
546
+ */
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>;
555
+ }
556
+
557
+ interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
558
+ [Symbol.iterator](): ArrayIterator<number>;
559
+ /**
560
+ * Returns an array of key, value pairs for every entry in the array
561
+ */
562
+ entries(): ArrayIterator<[number, number]>;
563
+ /**
564
+ * Returns an list of keys in the array
565
+ */
566
+ keys(): ArrayIterator<number>;
567
+ /**
568
+ * Returns an list of values in the array
569
+ */
570
+ values(): ArrayIterator<number>;
571
+ }
572
+
573
+ interface Float64ArrayConstructor {
574
+ new (elements: Iterable<number>): Float64Array<ArrayBuffer>;
575
+
576
+ /**
577
+ * Creates an array from an array-like or iterable object.
578
+ * @param arrayLike An array-like or iterable object to convert to an array.
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.
581
+ */
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>;
590
+ }
@@ -0,0 +1,81 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ interface PromiseConstructor {
20
+ /**
21
+ * A reference to the prototype.
22
+ */
23
+ readonly prototype: Promise<any>;
24
+
25
+ /**
26
+ * Creates a new Promise.
27
+ * @param executor A callback used to initialize the promise. This callback is passed two arguments:
28
+ * a resolve callback used to resolve the promise with a value or the result of another promise,
29
+ * and a reject callback used to reject the promise with a provided reason or error.
30
+ */
31
+ new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
32
+
33
+ /**
34
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
35
+ * resolve, or rejected when any Promise is rejected.
36
+ * @param values An array of Promises.
37
+ * @returns A new Promise.
38
+ */
39
+ all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>;
40
+
41
+ // see: lib.es2015.iterable.d.ts
42
+ // all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
43
+
44
+ /**
45
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
46
+ * or rejected.
47
+ * @param values An array of Promises.
48
+ * @returns A new Promise.
49
+ */
50
+ race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
51
+
52
+ // see: lib.es2015.iterable.d.ts
53
+ // race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
54
+
55
+ /**
56
+ * Creates a new rejected promise for the provided reason.
57
+ * @param reason The reason the promise was rejected.
58
+ * @returns A new rejected Promise.
59
+ */
60
+ reject<T = never>(reason?: any): Promise<T>;
61
+
62
+ /**
63
+ * Creates a new resolved promise.
64
+ * @returns A resolved promise.
65
+ */
66
+ resolve(): Promise<void>;
67
+ /**
68
+ * Creates a new resolved promise for the provided value.
69
+ * @param value A promise.
70
+ * @returns A promise whose internal state matches the provided promise.
71
+ */
72
+ resolve<T>(value: T): Promise<Awaited<T>>;
73
+ /**
74
+ * Creates a new resolved promise for the provided value.
75
+ * @param value A promise.
76
+ * @returns A promise whose internal state matches the provided promise.
77
+ */
78
+ resolve<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
79
+ }
80
+
81
+ declare var Promise: PromiseConstructor;