@rindo/core 1.17.4 → 2.5.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 (164) hide show
  1. package/LICENSE.md +27 -27
  2. package/bin/cli.ts +20 -0
  3. package/bin/rindo +51 -56
  4. package/cli/index.cjs +1263 -0
  5. package/cli/index.d.ts +1 -1
  6. package/cli/index.js +1232 -495
  7. package/cli/package.json +9 -4
  8. package/compiler/lib.d.ts +24 -0
  9. package/compiler/lib.dom.d.ts +20230 -0
  10. package/compiler/lib.dom.iterable.d.ts +351 -0
  11. package/compiler/lib.es2015.collection.d.ts +89 -0
  12. package/compiler/lib.es2015.core.d.ts +517 -0
  13. package/compiler/lib.es2015.d.ts +30 -0
  14. package/compiler/lib.es2015.generator.d.ts +79 -0
  15. package/compiler/lib.es2015.iterable.d.ts +505 -0
  16. package/compiler/lib.es2015.promise.d.ts +150 -0
  17. package/compiler/lib.es2015.proxy.d.ts +41 -0
  18. package/compiler/lib.es2015.reflect.d.ts +123 -0
  19. package/compiler/lib.es2015.symbol.d.ts +48 -0
  20. package/compiler/lib.es2015.symbol.wellknown.d.ts +324 -0
  21. package/compiler/lib.es2016.array.include.d.ts +118 -0
  22. package/compiler/lib.es2016.d.ts +22 -0
  23. package/compiler/lib.es2016.full.d.ts +25 -0
  24. package/compiler/lib.es2017.d.ts +26 -0
  25. package/compiler/lib.es2017.full.d.ts +25 -0
  26. package/compiler/lib.es2017.intl.d.ts +32 -0
  27. package/compiler/lib.es2017.object.d.ts +51 -0
  28. package/compiler/lib.es2017.sharedmemory.d.ts +137 -0
  29. package/compiler/lib.es2017.string.d.ts +47 -0
  30. package/compiler/lib.es2017.typedarrays.d.ts +55 -0
  31. package/compiler/lib.es2018.asyncgenerator.d.ts +79 -0
  32. package/compiler/lib.es2018.asynciterable.d.ts +45 -0
  33. package/compiler/lib.es2018.d.ts +26 -0
  34. package/compiler/lib.es2018.full.d.ts +25 -0
  35. package/compiler/lib.es2018.intl.d.ts +61 -0
  36. package/compiler/lib.es2018.promise.d.ts +32 -0
  37. package/compiler/lib.es2018.regexp.d.ts +39 -0
  38. package/compiler/lib.es2019.array.d.ts +85 -0
  39. package/compiler/lib.es2019.d.ts +25 -0
  40. package/compiler/lib.es2019.full.d.ts +25 -0
  41. package/compiler/lib.es2019.object.d.ts +35 -0
  42. package/compiler/lib.es2019.string.d.ts +33 -0
  43. package/compiler/lib.es2019.symbol.d.ts +26 -0
  44. package/compiler/lib.es2020.bigint.d.ts +728 -0
  45. package/compiler/lib.es2020.d.ts +27 -0
  46. package/compiler/lib.es2020.full.d.ts +25 -0
  47. package/compiler/lib.es2020.intl.d.ts +310 -0
  48. package/compiler/lib.es2020.promise.d.ts +50 -0
  49. package/compiler/lib.es2020.sharedmemory.d.ts +99 -0
  50. package/compiler/lib.es2020.string.d.ts +30 -0
  51. package/compiler/lib.es2020.symbol.wellknown.d.ts +39 -0
  52. package/compiler/lib.es5.d.ts +4435 -0
  53. package/compiler/lib.es6.d.ts +25 -0
  54. package/compiler/lib.esnext.d.ts +25 -0
  55. package/compiler/lib.esnext.full.d.ts +25 -0
  56. package/compiler/lib.esnext.intl.d.ts +32 -0
  57. package/compiler/lib.esnext.promise.d.ts +43 -0
  58. package/compiler/lib.esnext.string.d.ts +35 -0
  59. package/compiler/lib.esnext.weakref.d.ts +75 -0
  60. package/compiler/lib.scripthost.d.ts +327 -0
  61. package/compiler/lib.webworker.d.ts +6042 -0
  62. package/compiler/lib.webworker.importscripts.d.ts +26 -0
  63. package/compiler/lib.webworker.iterable.d.ts +166 -0
  64. package/compiler/package.json +3 -3
  65. package/compiler/rindo.d.ts +0 -16
  66. package/compiler/rindo.js +42738 -40541
  67. package/compiler/rindo.min.js +2 -15
  68. package/dependencies.json +73 -50
  69. package/dev-server/client/index.js +33 -10
  70. package/dev-server/client/package.json +3 -3
  71. package/dev-server/connector.html +3 -3
  72. package/dev-server/index.d.ts +3 -6
  73. package/dev-server/index.js +256 -252
  74. package/dev-server/package.json +3 -3
  75. package/dev-server/server-process.js +1738 -0
  76. package/dev-server/server-worker-thread.js +39 -0
  77. package/dev-server/templates/initial-load.html +160 -160
  78. package/dev-server/ws.js +1 -1
  79. package/internal/app-data/{index.cjs.js → index.cjs} +7 -5
  80. package/internal/app-data/index.d.ts +1 -0
  81. package/internal/app-data/index.js +7 -6
  82. package/internal/app-data/package.json +11 -5
  83. package/internal/client/css-shim.js +2 -2
  84. package/internal/client/dom.js +1 -1
  85. package/internal/client/index.js +193 -119
  86. package/internal/client/package.json +4 -3
  87. package/internal/client/{patch.js → patch-browser.js} +8 -24
  88. package/internal/client/patch-esm.js +23 -0
  89. package/internal/client/polyfills/css-shim.js +1 -1
  90. package/internal/client/polyfills/index.js +34 -34
  91. package/internal/client/shadow-css.js +9 -3
  92. package/internal/hydrate/index.js +305 -281
  93. package/internal/hydrate/package.json +2 -2
  94. package/internal/hydrate/runner.d.ts +24 -12
  95. package/internal/hydrate/runner.js +153 -124
  96. package/internal/hydrate/shadow-css.js +24 -24
  97. package/internal/package.json +5 -4
  98. package/internal/rindo-core/index.cjs +1 -0
  99. package/internal/rindo-core/index.d.ts +51 -2
  100. package/internal/rindo-core/index.js +15 -1
  101. package/internal/rindo-ext-modules.d.ts +41 -39
  102. package/internal/rindo-private.d.ts +93 -148
  103. package/internal/rindo-public-compiler.d.ts +231 -155
  104. package/internal/rindo-public-runtime.d.ts +42 -39
  105. package/internal/testing/index.js +144 -121
  106. package/internal/testing/package.json +2 -2
  107. package/internal/testing/shadow-css.js +24 -24
  108. package/mock-doc/index.cjs +4610 -0
  109. package/mock-doc/index.d.ts +12 -1
  110. package/mock-doc/index.js +177 -67
  111. package/mock-doc/package.json +11 -5
  112. package/package.json +132 -133
  113. package/readme.md +21 -95
  114. package/screenshot/compare/build/app.js +33 -33
  115. package/screenshot/compare/build/p-f4745c2f.entry.js +1 -1
  116. package/screenshot/connector-base.d.ts +1 -1
  117. package/screenshot/connector-local.d.ts +1 -1
  118. package/screenshot/index.js +63 -46
  119. package/screenshot/package.json +10 -3
  120. package/screenshot/pixel-match.js +54 -57
  121. package/screenshot/screenshot-compare.d.ts +1 -1
  122. package/screenshot/screenshot-fs.d.ts +1 -1
  123. package/sys/deno/index.js +1785 -0
  124. package/sys/deno/node-compat.js +2654 -0
  125. package/sys/deno/worker.js +44 -0
  126. package/sys/node/autoprefixer.js +8 -1
  127. package/sys/node/glob.js +1 -1
  128. package/sys/node/graceful-fs.js +1 -1
  129. package/sys/node/index.d.ts +1 -1
  130. package/sys/node/index.js +689 -705
  131. package/sys/node/node-fetch.js +1 -1
  132. package/sys/node/package.json +3 -3
  133. package/sys/node/prompts.js +1 -1
  134. package/sys/node/worker.js +38 -19
  135. package/testing/index.d.ts +3 -3
  136. package/testing/index.js +863 -749
  137. package/testing/jest/jest-config.d.ts +2 -89
  138. package/testing/jest/jest-environment.d.ts +1 -1
  139. package/testing/jest/jest-runner.d.ts +1 -1
  140. package/testing/jest/jest-screenshot.d.ts +1 -1
  141. package/testing/jest-preset.js +32 -32
  142. package/testing/matchers/events.d.ts +1 -1
  143. package/testing/matchers/screenshot.d.ts +1 -1
  144. package/testing/mock-fetch.d.ts +1 -1
  145. package/testing/mocks.d.ts +1 -1
  146. package/testing/package.json +3 -3
  147. package/testing/puppeteer/index.d.ts +1 -1
  148. package/testing/puppeteer/puppeteer-browser.d.ts +2 -2
  149. package/testing/puppeteer/puppeteer-declarations.d.ts +11 -11
  150. package/testing/puppeteer/puppeteer-element.d.ts +3 -3
  151. package/testing/puppeteer/puppeteer-emulate.d.ts +1 -1
  152. package/testing/puppeteer/puppeteer-events.d.ts +3 -3
  153. package/testing/puppeteer/puppeteer-page.d.ts +1 -1
  154. package/testing/puppeteer/puppeteer-screenshot.d.ts +2 -2
  155. package/testing/reset-build-conditionals.d.ts +1 -1
  156. package/testing/spec-page.d.ts +1 -1
  157. package/testing/test-transpile.d.ts +1 -1
  158. package/testing/testing-logger.d.ts +1 -1
  159. package/testing/testing-utils.d.ts +1 -1
  160. package/testing/testing.d.ts +1 -1
  161. package/cli/index.cjs.js +0 -524
  162. package/dev-server/content-type-db.json +0 -1
  163. package/dev-server/server-worker.js +0 -1570
  164. package/mock-doc/index.cjs.js +0 -4500
@@ -0,0 +1,505 @@
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
+
18
+ /// <reference no-default-lib="true"/>
19
+
20
+
21
+ /// <reference lib="es2015.symbol" />
22
+
23
+ interface SymbolConstructor {
24
+ /**
25
+ * A method that returns the default iterator for an object. Called by the semantics of the
26
+ * for-of statement.
27
+ */
28
+ readonly iterator: symbol;
29
+ }
30
+
31
+ interface IteratorYieldResult<TYield> {
32
+ done?: false;
33
+ value: TYield;
34
+ }
35
+
36
+ interface IteratorReturnResult<TReturn> {
37
+ done: true;
38
+ value: TReturn;
39
+ }
40
+
41
+ type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
42
+
43
+ interface Iterator<T, TReturn = any, TNext = undefined> {
44
+ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
45
+ next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
46
+ return?(value?: TReturn): IteratorResult<T, TReturn>;
47
+ throw?(e?: any): IteratorResult<T, TReturn>;
48
+ }
49
+
50
+ interface Iterable<T> {
51
+ [Symbol.iterator](): Iterator<T>;
52
+ }
53
+
54
+ interface IterableIterator<T> extends Iterator<T> {
55
+ [Symbol.iterator](): IterableIterator<T>;
56
+ }
57
+
58
+ interface Array<T> {
59
+ /** Iterator */
60
+ [Symbol.iterator](): IterableIterator<T>;
61
+
62
+ /**
63
+ * Returns an iterable of key, value pairs for every entry in the array
64
+ */
65
+ entries(): IterableIterator<[number, T]>;
66
+
67
+ /**
68
+ * Returns an iterable of keys in the array
69
+ */
70
+ keys(): IterableIterator<number>;
71
+
72
+ /**
73
+ * Returns an iterable of values in the array
74
+ */
75
+ values(): IterableIterator<T>;
76
+ }
77
+
78
+ interface ArrayConstructor {
79
+ /**
80
+ * Creates an array from an iterable object.
81
+ * @param iterable An iterable object to convert to an array.
82
+ */
83
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
84
+
85
+ /**
86
+ * Creates an array from an iterable object.
87
+ * @param iterable An iterable object to convert to an array.
88
+ * @param mapfn A mapping function to call on every element of the array.
89
+ * @param thisArg Value of 'this' used to invoke the mapfn.
90
+ */
91
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
92
+ }
93
+
94
+ interface ReadonlyArray<T> {
95
+ /** Iterator of values in the array. */
96
+ [Symbol.iterator](): IterableIterator<T>;
97
+
98
+ /**
99
+ * Returns an iterable of key, value pairs for every entry in the array
100
+ */
101
+ entries(): IterableIterator<[number, T]>;
102
+
103
+ /**
104
+ * Returns an iterable of keys in the array
105
+ */
106
+ keys(): IterableIterator<number>;
107
+
108
+ /**
109
+ * Returns an iterable of values in the array
110
+ */
111
+ values(): IterableIterator<T>;
112
+ }
113
+
114
+ interface IArguments {
115
+ /** Iterator */
116
+ [Symbol.iterator](): IterableIterator<any>;
117
+ }
118
+
119
+ interface Map<K, V> {
120
+ /** Returns an iterable of entries in the map. */
121
+ [Symbol.iterator](): IterableIterator<[K, V]>;
122
+
123
+ /**
124
+ * Returns an iterable of key, value pairs for every entry in the map.
125
+ */
126
+ entries(): IterableIterator<[K, V]>;
127
+
128
+ /**
129
+ * Returns an iterable of keys in the map
130
+ */
131
+ keys(): IterableIterator<K>;
132
+
133
+ /**
134
+ * Returns an iterable of values in the map
135
+ */
136
+ values(): IterableIterator<V>;
137
+ }
138
+
139
+ interface ReadonlyMap<K, V> {
140
+ /** Returns an iterable of entries in the map. */
141
+ [Symbol.iterator](): IterableIterator<[K, V]>;
142
+
143
+ /**
144
+ * Returns an iterable of key, value pairs for every entry in the map.
145
+ */
146
+ entries(): IterableIterator<[K, V]>;
147
+
148
+ /**
149
+ * Returns an iterable of keys in the map
150
+ */
151
+ keys(): IterableIterator<K>;
152
+
153
+ /**
154
+ * Returns an iterable of values in the map
155
+ */
156
+ values(): IterableIterator<V>;
157
+ }
158
+
159
+ interface MapConstructor {
160
+ new <K, V>(iterable: Iterable<readonly [K, V]>): Map<K, V>;
161
+ }
162
+
163
+ interface WeakMap<K extends object, V> { }
164
+
165
+ interface WeakMapConstructor {
166
+ new <K extends object, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
167
+ }
168
+
169
+ interface Set<T> {
170
+ /** Iterates over values in the set. */
171
+ [Symbol.iterator](): IterableIterator<T>;
172
+ /**
173
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
174
+ */
175
+ entries(): IterableIterator<[T, T]>;
176
+ /**
177
+ * Despite its name, returns an iterable of the values in the set.
178
+ */
179
+ keys(): IterableIterator<T>;
180
+
181
+ /**
182
+ * Returns an iterable of values in the set.
183
+ */
184
+ values(): IterableIterator<T>;
185
+ }
186
+
187
+ interface ReadonlySet<T> {
188
+ /** Iterates over values in the set. */
189
+ [Symbol.iterator](): IterableIterator<T>;
190
+
191
+ /**
192
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
193
+ */
194
+ entries(): IterableIterator<[T, T]>;
195
+
196
+ /**
197
+ * Despite its name, returns an iterable of the values in the set.
198
+ */
199
+ keys(): IterableIterator<T>;
200
+
201
+ /**
202
+ * Returns an iterable of values in the set.
203
+ */
204
+ values(): IterableIterator<T>;
205
+ }
206
+
207
+ interface SetConstructor {
208
+ new <T>(iterable?: Iterable<T> | null): Set<T>;
209
+ }
210
+
211
+ interface WeakSet<T extends object> { }
212
+
213
+ interface WeakSetConstructor {
214
+ new <T extends object = object>(iterable: Iterable<T>): WeakSet<T>;
215
+ }
216
+
217
+ interface Promise<T> { }
218
+
219
+ interface PromiseConstructor {
220
+ /**
221
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
222
+ * resolve, or rejected when any Promise is rejected.
223
+ * @param values An iterable of Promises.
224
+ * @returns A new Promise.
225
+ */
226
+ all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
227
+
228
+ /**
229
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
230
+ * or rejected.
231
+ * @param values An iterable of Promises.
232
+ * @returns A new Promise.
233
+ */
234
+ race<T>(values: Iterable<T>): Promise<T extends PromiseLike<infer U> ? U : T>;
235
+
236
+ /**
237
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
238
+ * or rejected.
239
+ * @param values An iterable of Promises.
240
+ * @returns A new Promise.
241
+ */
242
+ race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
243
+ }
244
+
245
+ interface String {
246
+ /** Iterator */
247
+ [Symbol.iterator](): IterableIterator<string>;
248
+ }
249
+
250
+ interface Int8Array {
251
+ [Symbol.iterator](): IterableIterator<number>;
252
+ /**
253
+ * Returns an array of key, value pairs for every entry in the array
254
+ */
255
+ entries(): IterableIterator<[number, number]>;
256
+ /**
257
+ * Returns an list of keys in the array
258
+ */
259
+ keys(): IterableIterator<number>;
260
+ /**
261
+ * Returns an list of values in the array
262
+ */
263
+ values(): IterableIterator<number>;
264
+ }
265
+
266
+ interface Int8ArrayConstructor {
267
+ new (elements: Iterable<number>): Int8Array;
268
+
269
+ /**
270
+ * Creates an array from an array-like or iterable object.
271
+ * @param arrayLike An array-like or iterable object to convert to an array.
272
+ * @param mapfn A mapping function to call on every element of the array.
273
+ * @param thisArg Value of 'this' used to invoke the mapfn.
274
+ */
275
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
276
+ }
277
+
278
+ interface Uint8Array {
279
+ [Symbol.iterator](): IterableIterator<number>;
280
+ /**
281
+ * Returns an array of key, value pairs for every entry in the array
282
+ */
283
+ entries(): IterableIterator<[number, number]>;
284
+ /**
285
+ * Returns an list of keys in the array
286
+ */
287
+ keys(): IterableIterator<number>;
288
+ /**
289
+ * Returns an list of values in the array
290
+ */
291
+ values(): IterableIterator<number>;
292
+ }
293
+
294
+ interface Uint8ArrayConstructor {
295
+ new (elements: Iterable<number>): Uint8Array;
296
+
297
+ /**
298
+ * Creates an array from an array-like or iterable object.
299
+ * @param arrayLike An array-like or iterable object to convert to an array.
300
+ * @param mapfn A mapping function to call on every element of the array.
301
+ * @param thisArg Value of 'this' used to invoke the mapfn.
302
+ */
303
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
304
+ }
305
+
306
+ interface Uint8ClampedArray {
307
+ [Symbol.iterator](): IterableIterator<number>;
308
+ /**
309
+ * Returns an array of key, value pairs for every entry in the array
310
+ */
311
+ entries(): IterableIterator<[number, number]>;
312
+
313
+ /**
314
+ * Returns an list of keys in the array
315
+ */
316
+ keys(): IterableIterator<number>;
317
+
318
+ /**
319
+ * Returns an list of values in the array
320
+ */
321
+ values(): IterableIterator<number>;
322
+ }
323
+
324
+ interface Uint8ClampedArrayConstructor {
325
+ new (elements: Iterable<number>): Uint8ClampedArray;
326
+
327
+
328
+ /**
329
+ * Creates an array from an array-like or iterable object.
330
+ * @param arrayLike An array-like or iterable object to convert to an array.
331
+ * @param mapfn A mapping function to call on every element of the array.
332
+ * @param thisArg Value of 'this' used to invoke the mapfn.
333
+ */
334
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
335
+ }
336
+
337
+ interface Int16Array {
338
+ [Symbol.iterator](): IterableIterator<number>;
339
+ /**
340
+ * Returns an array of key, value pairs for every entry in the array
341
+ */
342
+ entries(): IterableIterator<[number, number]>;
343
+
344
+ /**
345
+ * Returns an list of keys in the array
346
+ */
347
+ keys(): IterableIterator<number>;
348
+
349
+ /**
350
+ * Returns an list of values in the array
351
+ */
352
+ values(): IterableIterator<number>;
353
+ }
354
+
355
+ interface Int16ArrayConstructor {
356
+ new (elements: Iterable<number>): Int16Array;
357
+
358
+ /**
359
+ * Creates an array from an array-like or iterable object.
360
+ * @param arrayLike An array-like or iterable object to convert to an array.
361
+ * @param mapfn A mapping function to call on every element of the array.
362
+ * @param thisArg Value of 'this' used to invoke the mapfn.
363
+ */
364
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
365
+ }
366
+
367
+ interface Uint16Array {
368
+ [Symbol.iterator](): IterableIterator<number>;
369
+ /**
370
+ * Returns an array of key, value pairs for every entry in the array
371
+ */
372
+ entries(): IterableIterator<[number, number]>;
373
+ /**
374
+ * Returns an list of keys in the array
375
+ */
376
+ keys(): IterableIterator<number>;
377
+ /**
378
+ * Returns an list of values in the array
379
+ */
380
+ values(): IterableIterator<number>;
381
+ }
382
+
383
+ interface Uint16ArrayConstructor {
384
+ new (elements: Iterable<number>): Uint16Array;
385
+
386
+ /**
387
+ * Creates an array from an array-like or iterable object.
388
+ * @param arrayLike An array-like or iterable object to convert to an array.
389
+ * @param mapfn A mapping function to call on every element of the array.
390
+ * @param thisArg Value of 'this' used to invoke the mapfn.
391
+ */
392
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
393
+ }
394
+
395
+ interface Int32Array {
396
+ [Symbol.iterator](): IterableIterator<number>;
397
+ /**
398
+ * Returns an array of key, value pairs for every entry in the array
399
+ */
400
+ entries(): IterableIterator<[number, number]>;
401
+ /**
402
+ * Returns an list of keys in the array
403
+ */
404
+ keys(): IterableIterator<number>;
405
+ /**
406
+ * Returns an list of values in the array
407
+ */
408
+ values(): IterableIterator<number>;
409
+ }
410
+
411
+ interface Int32ArrayConstructor {
412
+ new (elements: Iterable<number>): Int32Array;
413
+
414
+ /**
415
+ * Creates an array from an array-like or iterable object.
416
+ * @param arrayLike An array-like or iterable object to convert to an array.
417
+ * @param mapfn A mapping function to call on every element of the array.
418
+ * @param thisArg Value of 'this' used to invoke the mapfn.
419
+ */
420
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
421
+ }
422
+
423
+ interface Uint32Array {
424
+ [Symbol.iterator](): IterableIterator<number>;
425
+ /**
426
+ * Returns an array of key, value pairs for every entry in the array
427
+ */
428
+ entries(): IterableIterator<[number, number]>;
429
+ /**
430
+ * Returns an list of keys in the array
431
+ */
432
+ keys(): IterableIterator<number>;
433
+ /**
434
+ * Returns an list of values in the array
435
+ */
436
+ values(): IterableIterator<number>;
437
+ }
438
+
439
+ interface Uint32ArrayConstructor {
440
+ new (elements: Iterable<number>): Uint32Array;
441
+
442
+ /**
443
+ * Creates an array from an array-like or iterable object.
444
+ * @param arrayLike An array-like or iterable object to convert to an array.
445
+ * @param mapfn A mapping function to call on every element of the array.
446
+ * @param thisArg Value of 'this' used to invoke the mapfn.
447
+ */
448
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
449
+ }
450
+
451
+ interface Float32Array {
452
+ [Symbol.iterator](): IterableIterator<number>;
453
+ /**
454
+ * Returns an array of key, value pairs for every entry in the array
455
+ */
456
+ entries(): IterableIterator<[number, number]>;
457
+ /**
458
+ * Returns an list of keys in the array
459
+ */
460
+ keys(): IterableIterator<number>;
461
+ /**
462
+ * Returns an list of values in the array
463
+ */
464
+ values(): IterableIterator<number>;
465
+ }
466
+
467
+ interface Float32ArrayConstructor {
468
+ new (elements: Iterable<number>): Float32Array;
469
+
470
+ /**
471
+ * Creates an array from an array-like or iterable object.
472
+ * @param arrayLike An array-like or iterable object to convert to an array.
473
+ * @param mapfn A mapping function to call on every element of the array.
474
+ * @param thisArg Value of 'this' used to invoke the mapfn.
475
+ */
476
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
477
+ }
478
+
479
+ interface Float64Array {
480
+ [Symbol.iterator](): IterableIterator<number>;
481
+ /**
482
+ * Returns an array of key, value pairs for every entry in the array
483
+ */
484
+ entries(): IterableIterator<[number, number]>;
485
+ /**
486
+ * Returns an list of keys in the array
487
+ */
488
+ keys(): IterableIterator<number>;
489
+ /**
490
+ * Returns an list of values in the array
491
+ */
492
+ values(): IterableIterator<number>;
493
+ }
494
+
495
+ interface Float64ArrayConstructor {
496
+ new (elements: Iterable<number>): Float64Array;
497
+
498
+ /**
499
+ * Creates an array from an array-like or iterable object.
500
+ * @param arrayLike An array-like or iterable object to convert to an array.
501
+ * @param mapfn A mapping function to call on every element of the array.
502
+ * @param thisArg Value of 'this' used to invoke the mapfn.
503
+ */
504
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
505
+ }
@@ -0,0 +1,150 @@
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
+
18
+ /// <reference no-default-lib="true"/>
19
+
20
+
21
+ interface PromiseConstructor {
22
+ /**
23
+ * A reference to the prototype.
24
+ */
25
+ readonly prototype: Promise<any>;
26
+
27
+ /**
28
+ * Creates a new Promise.
29
+ * @param executor A callback used to initialize the promise. This callback is passed two arguments:
30
+ * a resolve callback used to resolve the promise with a value or the result of another promise,
31
+ * and a reject callback used to reject the promise with a provided reason or error.
32
+ */
33
+ new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
34
+
35
+ /**
36
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
37
+ * resolve, or rejected when any Promise is rejected.
38
+ * @param values An array of Promises.
39
+ * @returns A new Promise.
40
+ */
41
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
42
+
43
+ /**
44
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
45
+ * resolve, or rejected when any Promise is rejected.
46
+ * @param values An array of Promises.
47
+ * @returns A new Promise.
48
+ */
49
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
50
+
51
+ /**
52
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
53
+ * resolve, or rejected when any Promise is rejected.
54
+ * @param values An array of Promises.
55
+ * @returns A new Promise.
56
+ */
57
+ all<T1, T2, T3, T4, T5, T6, T7, T8>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
58
+
59
+ /**
60
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
61
+ * resolve, or rejected when any Promise is rejected.
62
+ * @param values An array of Promises.
63
+ * @returns A new Promise.
64
+ */
65
+ all<T1, T2, T3, T4, T5, T6, T7>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
66
+
67
+ /**
68
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
69
+ * resolve, or rejected when any Promise is rejected.
70
+ * @param values An array of Promises.
71
+ * @returns A new Promise.
72
+ */
73
+ all<T1, T2, T3, T4, T5, T6>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
74
+
75
+ /**
76
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
77
+ * resolve, or rejected when any Promise is rejected.
78
+ * @param values An array of Promises.
79
+ * @returns A new Promise.
80
+ */
81
+ all<T1, T2, T3, T4, T5>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
82
+
83
+ /**
84
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
85
+ * resolve, or rejected when any Promise is rejected.
86
+ * @param values An array of Promises.
87
+ * @returns A new Promise.
88
+ */
89
+ all<T1, T2, T3, T4>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): Promise<[T1, T2, T3, T4]>;
90
+
91
+ /**
92
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
93
+ * resolve, or rejected when any Promise is rejected.
94
+ * @param values An array of Promises.
95
+ * @returns A new Promise.
96
+ */
97
+ all<T1, T2, T3>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
98
+
99
+ /**
100
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
101
+ * resolve, or rejected when any Promise is rejected.
102
+ * @param values An array of Promises.
103
+ * @returns A new Promise.
104
+ */
105
+ all<T1, T2>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
106
+
107
+ /**
108
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
109
+ * resolve, or rejected when any Promise is rejected.
110
+ * @param values An array of Promises.
111
+ * @returns A new Promise.
112
+ */
113
+ all<T>(values: readonly (T | PromiseLike<T>)[]): Promise<T[]>;
114
+
115
+ // see: lib.es2015.iterable.d.ts
116
+ // all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
117
+
118
+ /**
119
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
120
+ * or rejected.
121
+ * @param values An array of Promises.
122
+ * @returns A new Promise.
123
+ */
124
+ race<T>(values: readonly T[]): Promise<T extends PromiseLike<infer U> ? U : T>;
125
+
126
+ // see: lib.es2015.iterable.d.ts
127
+ // race<T>(values: Iterable<T>): Promise<T extends PromiseLike<infer U> ? U : T>;
128
+
129
+ /**
130
+ * Creates a new rejected promise for the provided reason.
131
+ * @param reason The reason the promise was rejected.
132
+ * @returns A new rejected Promise.
133
+ */
134
+ reject<T = never>(reason?: any): Promise<T>;
135
+
136
+ /**
137
+ * Creates a new resolved promise.
138
+ * @returns A resolved promise.
139
+ */
140
+ resolve(): Promise<void>;
141
+
142
+ /**
143
+ * Creates a new resolved promise for the provided value.
144
+ * @param value A promise.
145
+ * @returns A promise whose internal state matches the provided promise.
146
+ */
147
+ resolve<T>(value: T | PromiseLike<T>): Promise<T>;
148
+ }
149
+
150
+ declare var Promise: PromiseConstructor;
@@ -0,0 +1,41 @@
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
+
18
+ /// <reference no-default-lib="true"/>
19
+
20
+
21
+ interface ProxyHandler<T extends object> {
22
+ apply?(target: T, thisArg: any, argArray: any[]): any;
23
+ construct?(target: T, argArray: any[], newTarget: Function): object;
24
+ defineProperty?(target: T, p: string | symbol, attributes: PropertyDescriptor): boolean;
25
+ deleteProperty?(target: T, p: string | symbol): boolean;
26
+ get?(target: T, p: string | symbol, receiver: any): any;
27
+ getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined;
28
+ getPrototypeOf?(target: T): object | null;
29
+ has?(target: T, p: string | symbol): boolean;
30
+ isExtensible?(target: T): boolean;
31
+ ownKeys?(target: T): ArrayLike<string | symbol>;
32
+ preventExtensions?(target: T): boolean;
33
+ set?(target: T, p: string | symbol, value: any, receiver: any): boolean;
34
+ setPrototypeOf?(target: T, v: object | null): boolean;
35
+ }
36
+
37
+ interface ProxyConstructor {
38
+ revocable<T extends object>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
39
+ new <T extends object>(target: T, handler: ProxyHandler<T>): T;
40
+ }
41
+ declare var Proxy: ProxyConstructor;