@stencil/core 4.38.0 → 4.38.1
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/cli/index.cjs +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/lib.decorators.d.ts +13 -15
- package/compiler/lib.dom.asynciterable.d.ts +14 -6
- package/compiler/lib.dom.d.ts +15847 -5014
- package/compiler/lib.dom.iterable.d.ts +207 -111
- package/compiler/lib.es2015.core.d.ts +9 -9
- package/compiler/lib.es2015.generator.d.ts +2 -2
- package/compiler/lib.es2015.iterable.d.ts +214 -104
- package/compiler/lib.es2015.symbol.wellknown.d.ts +11 -11
- package/compiler/lib.es2016.array.include.d.ts +9 -9
- package/compiler/lib.es2016.intl.d.ts +1 -1
- package/compiler/lib.es2017.arraybuffer.d.ts +21 -0
- package/compiler/lib.es2017.d.ts +3 -2
- package/compiler/lib.es2017.object.d.ts +4 -4
- package/compiler/lib.es2017.sharedmemory.d.ts +15 -15
- package/compiler/lib.es2017.typedarrays.d.ts +9 -9
- package/compiler/lib.es2018.asyncgenerator.d.ts +2 -2
- package/compiler/lib.es2018.asynciterable.d.ts +16 -6
- package/compiler/lib.es2020.bigint.d.ts +100 -62
- package/compiler/lib.es2020.intl.d.ts +36 -36
- package/compiler/lib.es2020.sharedmemory.d.ts +13 -11
- package/compiler/lib.es2020.string.d.ts +3 -1
- package/compiler/lib.es2020.symbol.wellknown.d.ts +5 -1
- package/compiler/lib.es2021.intl.d.ts +17 -17
- package/compiler/lib.es2021.weakref.d.ts +2 -0
- package/compiler/lib.es2022.array.d.ts +11 -11
- package/compiler/lib.es2022.d.ts +1 -2
- package/compiler/lib.es2022.error.d.ts +2 -0
- package/compiler/lib.es2022.intl.d.ts +39 -11
- package/compiler/lib.es2023.array.d.ts +79 -79
- package/compiler/lib.es2024.arraybuffer.d.ts +65 -0
- package/compiler/lib.es2024.collection.d.ts +29 -0
- package/compiler/lib.es2024.d.ts +26 -0
- package/compiler/lib.es2024.full.d.ts +24 -0
- package/compiler/lib.es2024.promise.d.ts +35 -0
- package/compiler/{lib.es2022.sharedmemory.d.ts → lib.es2024.sharedmemory.d.ts} +29 -0
- package/compiler/lib.es5.d.ts +321 -305
- package/compiler/lib.esnext.array.d.ts +1 -1
- package/compiler/lib.esnext.collection.d.ts +1 -11
- package/compiler/lib.esnext.d.ts +6 -5
- package/compiler/lib.esnext.disposable.d.ts +8 -0
- package/compiler/lib.esnext.error.d.ts +24 -0
- package/compiler/lib.esnext.float16.d.ts +445 -0
- package/compiler/lib.esnext.iterator.d.ts +148 -0
- package/compiler/lib.esnext.promise.d.ts +11 -12
- package/compiler/lib.esnext.sharedmemory.d.ts +25 -0
- package/compiler/lib.webworker.asynciterable.d.ts +14 -6
- package/compiler/lib.webworker.d.ts +5113 -1394
- package/compiler/lib.webworker.iterable.d.ts +125 -61
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +20679 -15213
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/app-globals/package.json +1 -1
- package/internal/client/index.js +5 -2
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +5 -2
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +2 -2
- package/internal/package.json +1 -1
- package/internal/stencil-public-runtime.d.ts +2 -1
- package/internal/testing/index.js +4 -1
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +2 -2
- package/mock-doc/index.d.ts +2 -2
- package/mock-doc/index.js +2 -2
- package/mock-doc/package.json +1 -1
- package/package.json +9 -9
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/screenshot/screenshot-fs.d.ts +1 -1
- package/sys/node/index.js +1 -1
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.d.ts +1 -1
- package/testing/index.js +93 -1
- package/testing/mocks.d.ts +1 -0
- package/testing/package.json +1 -1
- /package/compiler/{lib.esnext.object.d.ts → lib.es2024.object.d.ts} +0 -0
- /package/compiler/{lib.esnext.regexp.d.ts → lib.es2024.regexp.d.ts} +0 -0
- /package/compiler/{lib.esnext.string.d.ts → lib.es2024.string.d.ts} +0 -0
|
@@ -269,46 +269,46 @@ interface String {
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
interface ArrayBuffer {
|
|
272
|
-
readonly [Symbol.toStringTag]:
|
|
272
|
+
readonly [Symbol.toStringTag]: "ArrayBuffer";
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
interface DataView {
|
|
275
|
+
interface DataView<TArrayBuffer extends ArrayBufferLike> {
|
|
276
276
|
readonly [Symbol.toStringTag]: string;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
interface Int8Array {
|
|
279
|
+
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
280
280
|
readonly [Symbol.toStringTag]: "Int8Array";
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
interface Uint8Array {
|
|
283
|
+
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
284
284
|
readonly [Symbol.toStringTag]: "Uint8Array";
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
interface Uint8ClampedArray {
|
|
287
|
+
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
|
|
288
288
|
readonly [Symbol.toStringTag]: "Uint8ClampedArray";
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
interface Int16Array {
|
|
291
|
+
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
292
292
|
readonly [Symbol.toStringTag]: "Int16Array";
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
interface Uint16Array {
|
|
295
|
+
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
296
296
|
readonly [Symbol.toStringTag]: "Uint16Array";
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
interface Int32Array {
|
|
299
|
+
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
300
300
|
readonly [Symbol.toStringTag]: "Int32Array";
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
interface Uint32Array {
|
|
303
|
+
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
304
304
|
readonly [Symbol.toStringTag]: "Uint32Array";
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
interface Float32Array {
|
|
307
|
+
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
308
308
|
readonly [Symbol.toStringTag]: "Float32Array";
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
interface Float64Array {
|
|
311
|
+
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
312
312
|
readonly [Symbol.toStringTag]: "Float64Array";
|
|
313
313
|
}
|
|
314
314
|
|
|
@@ -34,7 +34,7 @@ interface ReadonlyArray<T> {
|
|
|
34
34
|
includes(searchElement: T, fromIndex?: number): boolean;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
interface Int8Array {
|
|
37
|
+
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
38
38
|
/**
|
|
39
39
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
40
40
|
* @param searchElement The element to search for.
|
|
@@ -43,7 +43,7 @@ interface Int8Array {
|
|
|
43
43
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
interface Uint8Array {
|
|
46
|
+
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
47
47
|
/**
|
|
48
48
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
49
49
|
* @param searchElement The element to search for.
|
|
@@ -52,7 +52,7 @@ interface Uint8Array {
|
|
|
52
52
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
interface Uint8ClampedArray {
|
|
55
|
+
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
|
|
56
56
|
/**
|
|
57
57
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
58
58
|
* @param searchElement The element to search for.
|
|
@@ -61,7 +61,7 @@ interface Uint8ClampedArray {
|
|
|
61
61
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
interface Int16Array {
|
|
64
|
+
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
65
65
|
/**
|
|
66
66
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
67
67
|
* @param searchElement The element to search for.
|
|
@@ -70,7 +70,7 @@ interface Int16Array {
|
|
|
70
70
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
interface Uint16Array {
|
|
73
|
+
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
74
74
|
/**
|
|
75
75
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
76
76
|
* @param searchElement The element to search for.
|
|
@@ -79,7 +79,7 @@ interface Uint16Array {
|
|
|
79
79
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
interface Int32Array {
|
|
82
|
+
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
83
83
|
/**
|
|
84
84
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
85
85
|
* @param searchElement The element to search for.
|
|
@@ -88,7 +88,7 @@ interface Int32Array {
|
|
|
88
88
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
interface Uint32Array {
|
|
91
|
+
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
92
92
|
/**
|
|
93
93
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
94
94
|
* @param searchElement The element to search for.
|
|
@@ -97,7 +97,7 @@ interface Uint32Array {
|
|
|
97
97
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
interface Float32Array {
|
|
100
|
+
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
101
101
|
/**
|
|
102
102
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
103
103
|
* @param searchElement The element to search for.
|
|
@@ -106,7 +106,7 @@ interface Float32Array {
|
|
|
106
106
|
includes(searchElement: number, fromIndex?: number): boolean;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
interface Float64Array {
|
|
109
|
+
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
110
110
|
/**
|
|
111
111
|
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
112
112
|
* @param searchElement The element to search for.
|
|
@@ -22,7 +22,7 @@ declare namespace Intl {
|
|
|
22
22
|
* the canonical locale names. Duplicates will be omitted and elements
|
|
23
23
|
* will be validated as structurally valid language tags.
|
|
24
24
|
*
|
|
25
|
-
* [MDN](https://developer.mozilla.org/
|
|
25
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales)
|
|
26
26
|
*
|
|
27
27
|
* @param locale A list of String values for which to get the canonical locale names
|
|
28
28
|
* @returns An array containing the canonical and validated locale names.
|
|
@@ -0,0 +1,21 @@
|
|
|
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 ArrayBufferConstructor {
|
|
20
|
+
new (): ArrayBuffer;
|
|
21
|
+
}
|
package/compiler/lib.es2017.d.ts
CHANGED
|
@@ -17,9 +17,10 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
/// <reference lib="es2016" />
|
|
20
|
+
/// <reference lib="es2017.arraybuffer" />
|
|
21
|
+
/// <reference lib="es2017.date" />
|
|
22
|
+
/// <reference lib="es2017.intl" />
|
|
20
23
|
/// <reference lib="es2017.object" />
|
|
21
24
|
/// <reference lib="es2017.sharedmemory" />
|
|
22
25
|
/// <reference lib="es2017.string" />
|
|
23
|
-
/// <reference lib="es2017.intl" />
|
|
24
26
|
/// <reference lib="es2017.typedarrays" />
|
|
25
|
-
/// <reference lib="es2017.date" />
|
|
@@ -18,25 +18,25 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
interface ObjectConstructor {
|
|
20
20
|
/**
|
|
21
|
-
* Returns an array of values of the enumerable properties of an object
|
|
21
|
+
* Returns an array of values of the enumerable own properties of an object
|
|
22
22
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
23
23
|
*/
|
|
24
24
|
values<T>(o: { [s: string]: T; } | ArrayLike<T>): T[];
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Returns an array of values of the enumerable properties of an object
|
|
27
|
+
* Returns an array of values of the enumerable own properties of an object
|
|
28
28
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
29
29
|
*/
|
|
30
30
|
values(o: {}): any[];
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* Returns an array of key/values of the enumerable properties of an object
|
|
33
|
+
* Returns an array of key/values of the enumerable own properties of an object
|
|
34
34
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
35
35
|
*/
|
|
36
36
|
entries<T>(o: { [s: string]: T; } | ArrayLike<T>): [string, T][];
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* Returns an array of key/values of the enumerable properties of an object
|
|
39
|
+
* Returns an array of key/values of the enumerable own properties of an object
|
|
40
40
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
41
41
|
*/
|
|
42
42
|
entries(o: {}): [string, any][];
|
|
@@ -28,14 +28,14 @@ interface SharedArrayBuffer {
|
|
|
28
28
|
/**
|
|
29
29
|
* Returns a section of an SharedArrayBuffer.
|
|
30
30
|
*/
|
|
31
|
-
slice(begin
|
|
32
|
-
readonly [Symbol.species]: SharedArrayBuffer;
|
|
31
|
+
slice(begin?: number, end?: number): SharedArrayBuffer;
|
|
33
32
|
readonly [Symbol.toStringTag]: "SharedArrayBuffer";
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
interface SharedArrayBufferConstructor {
|
|
37
36
|
readonly prototype: SharedArrayBuffer;
|
|
38
|
-
new (byteLength
|
|
37
|
+
new (byteLength?: number): SharedArrayBuffer;
|
|
38
|
+
readonly [Symbol.species]: SharedArrayBufferConstructor;
|
|
39
39
|
}
|
|
40
40
|
declare var SharedArrayBuffer: SharedArrayBufferConstructor;
|
|
41
41
|
|
|
@@ -49,28 +49,28 @@ interface Atomics {
|
|
|
49
49
|
* Until this atomic operation completes, any other read or write operation against the array
|
|
50
50
|
* will block.
|
|
51
51
|
*/
|
|
52
|
-
add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
52
|
+
add(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Stores the bitwise AND of a value with the value at the given position in the array,
|
|
56
56
|
* returning the original value. Until this atomic operation completes, any other read or
|
|
57
57
|
* write operation against the array will block.
|
|
58
58
|
*/
|
|
59
|
-
and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
59
|
+
and(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* Replaces the value at the given position in the array if the original value equals the given
|
|
63
63
|
* expected value, returning the original value. Until this atomic operation completes, any
|
|
64
64
|
* other read or write operation against the array will block.
|
|
65
65
|
*/
|
|
66
|
-
compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
66
|
+
compareExchange(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, expectedValue: number, replacementValue: number): number;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* Replaces the value at the given position in the array, returning the original value. Until
|
|
70
70
|
* this atomic operation completes, any other read or write operation against the array will
|
|
71
71
|
* block.
|
|
72
72
|
*/
|
|
73
|
-
exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
73
|
+
exchange(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* Returns a value indicating whether high-performance algorithms can use atomic operations
|
|
@@ -83,27 +83,27 @@ interface Atomics {
|
|
|
83
83
|
* Returns the value at the given position in the array. Until this atomic operation completes,
|
|
84
84
|
* any other read or write operation against the array will block.
|
|
85
85
|
*/
|
|
86
|
-
load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
86
|
+
load(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number): number;
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* Stores the bitwise OR of a value with the value at the given position in the array,
|
|
90
90
|
* returning the original value. Until this atomic operation completes, any other read or write
|
|
91
91
|
* operation against the array will block.
|
|
92
92
|
*/
|
|
93
|
-
or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
93
|
+
or(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* Stores a value at the given position in the array, returning the new value. Until this
|
|
97
97
|
* atomic operation completes, any other read or write operation against the array will block.
|
|
98
98
|
*/
|
|
99
|
-
store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
99
|
+
store(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
* Subtracts a value from the value at the given position in the array, returning the original
|
|
103
103
|
* value. Until this atomic operation completes, any other read or write operation against the
|
|
104
104
|
* array will block.
|
|
105
105
|
*/
|
|
106
|
-
sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
106
|
+
sub(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
109
|
* If the value at the given position in the array is equal to the provided value, the current
|
|
@@ -111,23 +111,23 @@ interface Atomics {
|
|
|
111
111
|
* `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns
|
|
112
112
|
* `"not-equal"`.
|
|
113
113
|
*/
|
|
114
|
-
wait(typedArray: Int32Array
|
|
114
|
+
wait(typedArray: Int32Array<ArrayBufferLike>, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out";
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* Wakes up sleeping agents that are waiting on the given index of the array, returning the
|
|
118
118
|
* number of agents that were awoken.
|
|
119
|
-
* @param typedArray A shared Int32Array
|
|
119
|
+
* @param typedArray A shared Int32Array<ArrayBufferLike>.
|
|
120
120
|
* @param index The position in the typedArray to wake up on.
|
|
121
121
|
* @param count The number of sleeping agents to notify. Defaults to +Infinity.
|
|
122
122
|
*/
|
|
123
|
-
notify(typedArray: Int32Array
|
|
123
|
+
notify(typedArray: Int32Array<ArrayBufferLike>, index: number, count?: number): number;
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* Stores the bitwise XOR of a value with the value at the given position in the array,
|
|
127
127
|
* returning the original value. Until this atomic operation completes, any other read or write
|
|
128
128
|
* operation against the array will block.
|
|
129
129
|
*/
|
|
130
|
-
xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
|
|
130
|
+
xor(typedArray: Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
131
131
|
|
|
132
132
|
readonly [Symbol.toStringTag]: "Atomics";
|
|
133
133
|
}
|
|
@@ -17,37 +17,37 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
interface Int8ArrayConstructor {
|
|
20
|
-
new (): Int8Array
|
|
20
|
+
new (): Int8Array<ArrayBuffer>;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
interface Uint8ArrayConstructor {
|
|
24
|
-
new (): Uint8Array
|
|
24
|
+
new (): Uint8Array<ArrayBuffer>;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
interface Uint8ClampedArrayConstructor {
|
|
28
|
-
new (): Uint8ClampedArray
|
|
28
|
+
new (): Uint8ClampedArray<ArrayBuffer>;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
interface Int16ArrayConstructor {
|
|
32
|
-
new (): Int16Array
|
|
32
|
+
new (): Int16Array<ArrayBuffer>;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
interface Uint16ArrayConstructor {
|
|
36
|
-
new (): Uint16Array
|
|
36
|
+
new (): Uint16Array<ArrayBuffer>;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
interface Int32ArrayConstructor {
|
|
40
|
-
new (): Int32Array
|
|
40
|
+
new (): Int32Array<ArrayBuffer>;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
interface Uint32ArrayConstructor {
|
|
44
|
-
new (): Uint32Array
|
|
44
|
+
new (): Uint32Array<ArrayBuffer>;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
interface Float32ArrayConstructor {
|
|
48
|
-
new (): Float32Array
|
|
48
|
+
new (): Float32Array<ArrayBuffer>;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
interface Float64ArrayConstructor {
|
|
52
|
-
new (): Float64Array
|
|
52
|
+
new (): Float64Array<ArrayBuffer>;
|
|
53
53
|
}
|
|
@@ -18,9 +18,9 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
/// <reference lib="es2018.asynciterable" />
|
|
20
20
|
|
|
21
|
-
interface AsyncGenerator<T = unknown, TReturn = any, TNext =
|
|
21
|
+
interface AsyncGenerator<T = unknown, TReturn = any, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
|
|
22
22
|
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
|
23
|
-
next(...
|
|
23
|
+
next(...[value]: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
|
|
24
24
|
return(value: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
|
|
25
25
|
throw(e: any): Promise<IteratorResult<T, TReturn>>;
|
|
26
26
|
[Symbol.asyncIterator](): AsyncGenerator<T, TReturn, TNext>;
|
|
@@ -27,17 +27,27 @@ interface SymbolConstructor {
|
|
|
27
27
|
readonly asyncIterator: unique symbol;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
interface AsyncIterator<T, TReturn = any, TNext =
|
|
30
|
+
interface AsyncIterator<T, TReturn = any, TNext = any> {
|
|
31
31
|
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
|
32
|
-
next(...
|
|
32
|
+
next(...[value]: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
|
|
33
33
|
return?(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
|
|
34
34
|
throw?(e?: any): Promise<IteratorResult<T, TReturn>>;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
interface AsyncIterable<T> {
|
|
38
|
-
[Symbol.asyncIterator](): AsyncIterator<T>;
|
|
37
|
+
interface AsyncIterable<T, TReturn = any, TNext = any> {
|
|
38
|
+
[Symbol.asyncIterator](): AsyncIterator<T, TReturn, TNext>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Describes a user-defined {@link AsyncIterator} that is also async iterable.
|
|
43
|
+
*/
|
|
44
|
+
interface AsyncIterableIterator<T, TReturn = any, TNext = any> extends AsyncIterator<T, TReturn, TNext> {
|
|
45
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<T, TReturn, TNext>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`.
|
|
50
|
+
*/
|
|
51
|
+
interface AsyncIteratorObject<T, TReturn = unknown, TNext = unknown> extends AsyncIterator<T, TReturn, TNext> {
|
|
52
|
+
[Symbol.asyncIterator](): AsyncIteratorObject<T, TReturn, TNext>;
|
|
43
53
|
}
|