@stencil/core 2.8.0 → 2.10.0
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 +234 -209
- package/cli/index.js +234 -209
- package/cli/package.json +1 -1
- package/compiler/lib.dom.d.ts +263 -648
- package/compiler/lib.dom.iterable.d.ts +1 -5
- package/compiler/lib.es2015.core.d.ts +2 -2
- package/compiler/lib.es2015.iterable.d.ts +1 -1
- package/compiler/lib.es2015.symbol.wellknown.d.ts +10 -10
- package/compiler/lib.es2018.asynciterable.d.ts +1 -1
- package/compiler/lib.es2020.bigint.d.ts +1 -1
- package/compiler/lib.es2020.intl.d.ts +6 -7
- package/compiler/lib.es2020.symbol.wellknown.d.ts +1 -1
- package/compiler/lib.es2021.d.ts +24 -0
- package/compiler/lib.es2021.full.d.ts +25 -0
- package/compiler/lib.es2021.promise.d.ts +43 -0
- package/compiler/lib.es2021.string.d.ts +35 -0
- package/compiler/lib.es2021.weakref.d.ts +75 -0
- package/compiler/lib.es5.d.ts +9 -9
- package/compiler/lib.esnext.d.ts +1 -4
- package/compiler/lib.esnext.promise.d.ts +26 -26
- package/compiler/lib.esnext.string.d.ts +18 -18
- package/compiler/lib.esnext.weakref.d.ts +58 -58
- package/compiler/lib.webworker.d.ts +98 -153
- package/compiler/lib.webworker.iterable.d.ts +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +923 -234
- package/compiler/stencil.min.js +2 -2
- package/dependencies.json +6 -1
- 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/index.cjs +1 -0
- package/internal/app-data/index.js +1 -0
- package/internal/app-data/package.json +1 -1
- package/internal/client/css-shim.js +1 -1
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +188 -99
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +64 -39
- package/internal/hydrate/package.json +1 -1
- package/internal/index.js +1 -0
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +130 -6
- package/internal/stencil-public-compiler.d.ts +20 -2
- package/internal/testing/index.js +78 -50
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +4 -1
- package/mock-doc/index.d.ts +7 -6
- package/mock-doc/index.js +4 -1
- package/mock-doc/package.json +1 -1
- package/package.json +11 -5
- package/readme.md +2 -2
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/sys/node/index.js +4435 -425
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +24 -19
- package/testing/mocks.d.ts +1 -5
- package/testing/package.json +1 -1
- package/testing/testing-sys.d.ts +6 -1
- package/bin/cli.ts +0 -20
- package/screenshot/index.js.map +0 -1
- package/sys/deno/index.js +0 -1791
- package/sys/deno/node-compat.js +0 -2654
- package/sys/deno/worker.js +0 -44
|
@@ -139,7 +139,7 @@ interface IDBDatabase {
|
|
|
139
139
|
interface IDBObjectStore {
|
|
140
140
|
/**
|
|
141
141
|
* Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
|
|
142
|
-
*
|
|
142
|
+
*
|
|
143
143
|
* Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
|
|
144
144
|
*/
|
|
145
145
|
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
|
|
@@ -287,10 +287,6 @@ interface WEBGL_draw_buffers {
|
|
|
287
287
|
drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
interface WebAuthentication {
|
|
291
|
-
makeCredential(accountInformation: Account, cryptoParameters: Iterable<ScopedCredentialParameters>, attestationChallenge: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
290
|
interface WebGL2RenderingContextBase {
|
|
295
291
|
clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void;
|
|
296
292
|
clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void;
|
|
@@ -268,8 +268,8 @@ interface NumberConstructor {
|
|
|
268
268
|
|
|
269
269
|
/**
|
|
270
270
|
* Converts A string to an integer.
|
|
271
|
-
* @param
|
|
272
|
-
* @param radix A value between 2 and 36 that specifies the base of the number in
|
|
271
|
+
* @param string A string to convert into a number.
|
|
272
|
+
* @param radix A value between 2 and 36 that specifies the base of the number in `string`.
|
|
273
273
|
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
|
|
274
274
|
* All other strings are considered decimal.
|
|
275
275
|
*/
|
|
@@ -25,7 +25,7 @@ interface SymbolConstructor {
|
|
|
25
25
|
* A method that returns the default iterator for an object. Called by the semantics of the
|
|
26
26
|
* for-of statement.
|
|
27
27
|
*/
|
|
28
|
-
readonly iterator: symbol;
|
|
28
|
+
readonly iterator: unique symbol;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
interface IteratorYieldResult<TYield> {
|
|
@@ -25,61 +25,61 @@ interface SymbolConstructor {
|
|
|
25
25
|
* A method that determines if a constructor object recognizes an object as one of the
|
|
26
26
|
* constructor’s instances. Called by the semantics of the instanceof operator.
|
|
27
27
|
*/
|
|
28
|
-
readonly hasInstance: symbol;
|
|
28
|
+
readonly hasInstance: unique symbol;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* A Boolean value that if true indicates that an object should flatten to its array elements
|
|
32
32
|
* by Array.prototype.concat.
|
|
33
33
|
*/
|
|
34
|
-
readonly isConcatSpreadable: symbol;
|
|
34
|
+
readonly isConcatSpreadable: unique symbol;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* A regular expression method that matches the regular expression against a string. Called
|
|
38
38
|
* by the String.prototype.match method.
|
|
39
39
|
*/
|
|
40
|
-
readonly match: symbol;
|
|
40
|
+
readonly match: unique symbol;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* A regular expression method that replaces matched substrings of a string. Called by the
|
|
44
44
|
* String.prototype.replace method.
|
|
45
45
|
*/
|
|
46
|
-
readonly replace: symbol;
|
|
46
|
+
readonly replace: unique symbol;
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* A regular expression method that returns the index within a string that matches the
|
|
50
50
|
* regular expression. Called by the String.prototype.search method.
|
|
51
51
|
*/
|
|
52
|
-
readonly search: symbol;
|
|
52
|
+
readonly search: unique symbol;
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* A function valued property that is the constructor function that is used to create
|
|
56
56
|
* derived objects.
|
|
57
57
|
*/
|
|
58
|
-
readonly species: symbol;
|
|
58
|
+
readonly species: unique symbol;
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* A regular expression method that splits a string at the indices that match the regular
|
|
62
62
|
* expression. Called by the String.prototype.split method.
|
|
63
63
|
*/
|
|
64
|
-
readonly split: symbol;
|
|
64
|
+
readonly split: unique symbol;
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* A method that converts an object to a corresponding primitive value.
|
|
68
68
|
* Called by the ToPrimitive abstract operation.
|
|
69
69
|
*/
|
|
70
|
-
readonly toPrimitive: symbol;
|
|
70
|
+
readonly toPrimitive: unique symbol;
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* A String value that is used in the creation of the default string description of an object.
|
|
74
74
|
* Called by the built-in method Object.prototype.toString.
|
|
75
75
|
*/
|
|
76
|
-
readonly toStringTag: symbol;
|
|
76
|
+
readonly toStringTag: unique symbol;
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* An Object whose own property names are property names that are excluded from the 'with'
|
|
80
80
|
* environment bindings of the associated objects.
|
|
81
81
|
*/
|
|
82
|
-
readonly unscopables: symbol;
|
|
82
|
+
readonly unscopables: unique symbol;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
interface Symbol {
|
|
@@ -26,7 +26,7 @@ interface SymbolConstructor {
|
|
|
26
26
|
* A method that returns the default async iterator for an object. Called by the semantics of
|
|
27
27
|
* the for-await-of statement.
|
|
28
28
|
*/
|
|
29
|
-
readonly asyncIterator: symbol;
|
|
29
|
+
readonly asyncIterator: unique symbol;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
interface AsyncIterator<T, TReturn = any, TNext = undefined> {
|
|
@@ -21,13 +21,12 @@ and limitations under the License.
|
|
|
21
21
|
declare namespace Intl {
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* [BCP 47
|
|
24
|
+
* [Unicode BCP 47 Locale Identifiers](https://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers) definition.
|
|
25
25
|
*
|
|
26
26
|
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
|
|
27
27
|
*
|
|
28
|
-
* [Wikipedia](https://en.wikipedia.org/wiki/IETF_language_tag).
|
|
29
28
|
*/
|
|
30
|
-
type
|
|
29
|
+
type UnicodeBCP47LocaleIdentifier = string;
|
|
31
30
|
|
|
32
31
|
/**
|
|
33
32
|
* Unit to use in the relative time internationalized message.
|
|
@@ -98,7 +97,7 @@ declare namespace Intl {
|
|
|
98
97
|
* [Specification](https://tc39.es/ecma402/#table-relativetimeformat-resolvedoptions-properties)
|
|
99
98
|
*/
|
|
100
99
|
interface ResolvedRelativeTimeFormatOptions {
|
|
101
|
-
locale:
|
|
100
|
+
locale: UnicodeBCP47LocaleIdentifier;
|
|
102
101
|
style: RelativeTimeFormatStyle;
|
|
103
102
|
numeric: RelativeTimeFormatNumeric;
|
|
104
103
|
numberingSystem: string;
|
|
@@ -241,7 +240,7 @@ declare namespace Intl {
|
|
|
241
240
|
* [Specification](https://tc39.es/ecma402/#sec-intl-relativetimeformat-constructor).
|
|
242
241
|
*/
|
|
243
242
|
new(
|
|
244
|
-
locales?:
|
|
243
|
+
locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
|
|
245
244
|
options?: RelativeTimeFormatOptions,
|
|
246
245
|
): RelativeTimeFormat;
|
|
247
246
|
|
|
@@ -277,9 +276,9 @@ declare namespace Intl {
|
|
|
277
276
|
* [Specification](https://tc39.es/ecma402/#sec-Intl.RelativeTimeFormat.supportedLocalesOf).
|
|
278
277
|
*/
|
|
279
278
|
supportedLocalesOf(
|
|
280
|
-
locales
|
|
279
|
+
locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
|
|
281
280
|
options?: RelativeTimeFormatOptions,
|
|
282
|
-
):
|
|
281
|
+
): UnicodeBCP47LocaleIdentifier[];
|
|
283
282
|
};
|
|
284
283
|
|
|
285
284
|
interface NumberFormatOptions {
|
|
@@ -26,7 +26,7 @@ interface SymbolConstructor {
|
|
|
26
26
|
* A regular expression method that matches the regular expression against a string. Called
|
|
27
27
|
* by the String.prototype.matchAll method.
|
|
28
28
|
*/
|
|
29
|
-
readonly matchAll: symbol;
|
|
29
|
+
readonly matchAll: unique symbol;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
interface RegExp {
|
|
@@ -0,0 +1,24 @@
|
|
|
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="es2020" />
|
|
22
|
+
/// <reference lib="es2021.promise" />
|
|
23
|
+
/// <reference lib="es2021.string" />
|
|
24
|
+
/// <reference lib="es2021.weakref" />
|
|
@@ -0,0 +1,25 @@
|
|
|
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="es2021" />
|
|
22
|
+
/// <reference lib="dom" />
|
|
23
|
+
/// <reference lib="webworker.importscripts" />
|
|
24
|
+
/// <reference lib="scripthost" />
|
|
25
|
+
/// <reference lib="dom.iterable" />
|
|
@@ -0,0 +1,43 @@
|
|
|
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 AggregateError extends Error {
|
|
22
|
+
errors: any[]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface AggregateErrorConstructor {
|
|
26
|
+
new(errors: Iterable<any>, message?: string): AggregateError;
|
|
27
|
+
(errors: Iterable<any>, message?: string): AggregateError;
|
|
28
|
+
readonly prototype: AggregateError;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare var AggregateError: AggregateErrorConstructor;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Represents the completion of an asynchronous operation
|
|
35
|
+
*/
|
|
36
|
+
interface PromiseConstructor {
|
|
37
|
+
/**
|
|
38
|
+
* The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
|
|
39
|
+
* @param values An array or iterable of Promises.
|
|
40
|
+
* @returns A new Promise.
|
|
41
|
+
*/
|
|
42
|
+
any<T>(values: (T | PromiseLike<T>)[] | Iterable<T | PromiseLike<T>>): Promise<T>
|
|
43
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 String {
|
|
22
|
+
/**
|
|
23
|
+
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
24
|
+
* @param searchValue A string to search for.
|
|
25
|
+
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
|
|
26
|
+
*/
|
|
27
|
+
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
31
|
+
* @param searchValue A string to search for.
|
|
32
|
+
* @param replacer A function that returns the replacement text.
|
|
33
|
+
*/
|
|
34
|
+
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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 WeakRef<T extends object> {
|
|
22
|
+
readonly [Symbol.toStringTag]: "WeakRef";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns the WeakRef instance's target object, or undefined if the target object has been
|
|
26
|
+
* reclaimed.
|
|
27
|
+
*/
|
|
28
|
+
deref(): T | undefined;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface WeakRefConstructor {
|
|
32
|
+
readonly prototype: WeakRef<any>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Creates a WeakRef instance for the given target object.
|
|
36
|
+
* @param target The target object for the WeakRef instance.
|
|
37
|
+
*/
|
|
38
|
+
new<T extends object>(target: T): WeakRef<T>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare var WeakRef: WeakRefConstructor;
|
|
42
|
+
|
|
43
|
+
interface FinalizationRegistry<T> {
|
|
44
|
+
readonly [Symbol.toStringTag]: "FinalizationRegistry";
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Registers an object with the registry.
|
|
48
|
+
* @param target The target object to register.
|
|
49
|
+
* @param heldValue The value to pass to the finalizer for this object. This cannot be the
|
|
50
|
+
* target object.
|
|
51
|
+
* @param unregisterToken The token to pass to the unregister method to unregister the target
|
|
52
|
+
* object. If provided (and not undefined), this must be an object. If not provided, the target
|
|
53
|
+
* cannot be unregistered.
|
|
54
|
+
*/
|
|
55
|
+
register(target: object, heldValue: T, unregisterToken?: object): void;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Unregisters an object from the registry.
|
|
59
|
+
* @param unregisterToken The token that was used as the unregisterToken argument when calling
|
|
60
|
+
* register to register the target object.
|
|
61
|
+
*/
|
|
62
|
+
unregister(unregisterToken: object): void;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface FinalizationRegistryConstructor {
|
|
66
|
+
readonly prototype: FinalizationRegistry<any>;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Creates a finalization registry with an associated cleanup callback
|
|
70
|
+
* @param cleanupCallback The callback to call after an object in the registry has been reclaimed.
|
|
71
|
+
*/
|
|
72
|
+
new<T>(cleanupCallback: (heldValue: T) => void): FinalizationRegistry<T>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare var FinalizationRegistry: FinalizationRegistryConstructor;
|
package/compiler/lib.es5.d.ts
CHANGED
|
@@ -33,12 +33,12 @@ declare function eval(x: string): any;
|
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Converts a string to an integer.
|
|
36
|
-
* @param
|
|
37
|
-
* @param radix A value between 2 and 36 that specifies the base of the number in
|
|
36
|
+
* @param string A string to convert into a number.
|
|
37
|
+
* @param radix A value between 2 and 36 that specifies the base of the number in `string`.
|
|
38
38
|
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
|
|
39
39
|
* All other strings are considered decimal.
|
|
40
40
|
*/
|
|
41
|
-
declare function parseInt(
|
|
41
|
+
declare function parseInt(string: string, radix?: number): number;
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Converts a string to a floating-point number.
|
|
@@ -197,14 +197,14 @@ interface ObjectConstructor {
|
|
|
197
197
|
* @param p The property name.
|
|
198
198
|
* @param attributes Descriptor for the property. It can be for a data property or an accessor property.
|
|
199
199
|
*/
|
|
200
|
-
defineProperty(o:
|
|
200
|
+
defineProperty<T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): T;
|
|
201
201
|
|
|
202
202
|
/**
|
|
203
203
|
* Adds one or more properties to an object, and/or modifies attributes of existing properties.
|
|
204
204
|
* @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
|
|
205
205
|
* @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
|
|
206
206
|
*/
|
|
207
|
-
defineProperties(o:
|
|
207
|
+
defineProperties<T>(o: T, properties: PropertyDescriptorMap & ThisType<any>): T;
|
|
208
208
|
|
|
209
209
|
/**
|
|
210
210
|
* Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
|
|
@@ -1093,7 +1093,7 @@ interface ReadonlyArray<T> {
|
|
|
1093
1093
|
*/
|
|
1094
1094
|
toString(): string;
|
|
1095
1095
|
/**
|
|
1096
|
-
* Returns a string representation of an array. The elements are converted to string using their
|
|
1096
|
+
* Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
|
|
1097
1097
|
*/
|
|
1098
1098
|
toLocaleString(): string;
|
|
1099
1099
|
/**
|
|
@@ -1227,7 +1227,7 @@ interface Array<T> {
|
|
|
1227
1227
|
*/
|
|
1228
1228
|
toString(): string;
|
|
1229
1229
|
/**
|
|
1230
|
-
* Returns a string representation of an array. The elements are converted to string using their
|
|
1230
|
+
* Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
|
|
1231
1231
|
*/
|
|
1232
1232
|
toLocaleString(): string;
|
|
1233
1233
|
/**
|
|
@@ -1528,7 +1528,7 @@ type Parameters<T extends (...args: any) => any> = T extends (...args: infer P)
|
|
|
1528
1528
|
/**
|
|
1529
1529
|
* Obtain the parameters of a constructor function type in a tuple
|
|
1530
1530
|
*/
|
|
1531
|
-
type ConstructorParameters<T extends new (...args: any) => any> = T extends new (...args: infer P) => any ? P : never;
|
|
1531
|
+
type ConstructorParameters<T extends abstract new (...args: any) => any> = T extends abstract new (...args: infer P) => any ? P : never;
|
|
1532
1532
|
|
|
1533
1533
|
/**
|
|
1534
1534
|
* Obtain the return type of a function type
|
|
@@ -1538,7 +1538,7 @@ type ReturnType<T extends (...args: any) => any> = T extends (...args: any) => i
|
|
|
1538
1538
|
/**
|
|
1539
1539
|
* Obtain the return type of a constructor function type
|
|
1540
1540
|
*/
|
|
1541
|
-
type InstanceType<T extends new (...args: any) => any> = T extends new (...args: any) => infer R ? R : any;
|
|
1541
|
+
type InstanceType<T extends abstract new (...args: any) => any> = T extends abstract new (...args: any) => infer R ? R : any;
|
|
1542
1542
|
|
|
1543
1543
|
/**
|
|
1544
1544
|
* Convert string literal type to uppercase
|
package/compiler/lib.esnext.d.ts
CHANGED
|
@@ -18,8 +18,5 @@ and limitations under the License.
|
|
|
18
18
|
/// <reference no-default-lib="true"/>
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
/// <reference lib="
|
|
21
|
+
/// <reference lib="es2021" />
|
|
22
22
|
/// <reference lib="esnext.intl" />
|
|
23
|
-
/// <reference lib="esnext.string" />
|
|
24
|
-
/// <reference lib="esnext.promise" />
|
|
25
|
-
/// <reference lib="esnext.weakref" />
|
|
@@ -15,29 +15,29 @@ and limitations under the License.
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
/// <reference no-default-lib="true"/>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
interface AggregateError extends Error {
|
|
22
|
-
errors: any[]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface AggregateErrorConstructor {
|
|
26
|
-
new(errors: Iterable<any>, message?: string): AggregateError;
|
|
27
|
-
(errors: Iterable<any>, message?: string): AggregateError;
|
|
28
|
-
readonly prototype: AggregateError;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
declare var AggregateError: AggregateErrorConstructor;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Represents the completion of an asynchronous operation
|
|
35
|
-
*/
|
|
36
|
-
interface PromiseConstructor {
|
|
37
|
-
/**
|
|
38
|
-
* The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
|
|
39
|
-
* @param values An array or iterable of Promises.
|
|
40
|
-
* @returns A new Promise.
|
|
41
|
-
*/
|
|
42
|
-
any<T>(values: (T | PromiseLike<T>)[] | Iterable<T | PromiseLike<T>>): Promise<T>
|
|
43
|
-
}
|
|
18
|
+
/// <reference no-default-lib="true"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
interface AggregateError extends Error {
|
|
22
|
+
errors: any[]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface AggregateErrorConstructor {
|
|
26
|
+
new(errors: Iterable<any>, message?: string): AggregateError;
|
|
27
|
+
(errors: Iterable<any>, message?: string): AggregateError;
|
|
28
|
+
readonly prototype: AggregateError;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare var AggregateError: AggregateErrorConstructor;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Represents the completion of an asynchronous operation
|
|
35
|
+
*/
|
|
36
|
+
interface PromiseConstructor {
|
|
37
|
+
/**
|
|
38
|
+
* The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
|
|
39
|
+
* @param values An array or iterable of Promises.
|
|
40
|
+
* @returns A new Promise.
|
|
41
|
+
*/
|
|
42
|
+
any<T>(values: (T | PromiseLike<T>)[] | Iterable<T | PromiseLike<T>>): Promise<T>
|
|
43
|
+
}
|
|
@@ -15,21 +15,21 @@ and limitations under the License.
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
/// <reference no-default-lib="true"/>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
interface String {
|
|
22
|
-
/**
|
|
23
|
-
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
24
|
-
* @param searchValue A string to search for.
|
|
25
|
-
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
|
|
26
|
-
*/
|
|
27
|
-
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
31
|
-
* @param searchValue A string to search for.
|
|
32
|
-
* @param replacer A function that returns the replacement text.
|
|
33
|
-
*/
|
|
34
|
-
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
|
35
|
-
}
|
|
18
|
+
/// <reference no-default-lib="true"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
interface String {
|
|
22
|
+
/**
|
|
23
|
+
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
24
|
+
* @param searchValue A string to search for.
|
|
25
|
+
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
|
|
26
|
+
*/
|
|
27
|
+
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
31
|
+
* @param searchValue A string to search for.
|
|
32
|
+
* @param replacer A function that returns the replacement text.
|
|
33
|
+
*/
|
|
34
|
+
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
|
35
|
+
}
|