@stencil/core 4.19.2 → 4.20.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 +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/lib.dom.asynciterable.d.ts +5 -0
- package/compiler/lib.dom.d.ts +211 -33
- package/compiler/lib.dom.iterable.d.ts +8 -0
- package/compiler/lib.es2015.core.d.ts +40 -0
- package/compiler/lib.es2018.intl.d.ts +16 -4
- package/compiler/lib.es2019.intl.d.ts +1 -1
- package/compiler/lib.es2020.bigint.d.ts +2 -3
- package/compiler/lib.es2020.intl.d.ts +32 -7
- package/compiler/lib.es2021.weakref.d.ts +1 -1
- package/compiler/lib.es2022.regexp.d.ts +1 -1
- package/compiler/lib.es2023.d.ts +1 -0
- package/compiler/lib.es2023.intl.d.ts +56 -0
- package/compiler/lib.es5.d.ts +31 -9
- package/compiler/lib.esnext.array.d.ts +35 -0
- package/compiler/lib.esnext.collection.d.ts +77 -0
- package/compiler/lib.esnext.d.ts +3 -0
- package/compiler/lib.esnext.intl.d.ts +1 -8
- package/compiler/lib.esnext.regexp.d.ts +25 -0
- package/compiler/lib.esnext.string.d.ts +29 -0
- package/compiler/lib.webworker.asynciterable.d.ts +5 -0
- package/compiler/lib.webworker.d.ts +20 -6
- package/compiler/lib.webworker.iterable.d.ts +5 -0
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +212817 -210315
- 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/client/index.js +49 -31
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/shadow-css.js +6 -30
- package/internal/hydrate/index.js +52 -36
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +7 -7
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +0 -1
- package/internal/stencil-public-compiler.d.ts +8 -5
- package/internal/testing/index.js +48 -30
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +3 -3
- package/mock-doc/index.d.ts +1 -1
- package/mock-doc/index.js +3 -3
- package/mock-doc/package.json +1 -1
- package/package.json +10 -3
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/screenshot/screenshot-compare.d.ts +1 -2
- package/screenshot/screenshot-fs.d.ts +0 -1
- package/sys/node/index.js +6 -6
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +31 -2
- package/testing/jest/jest-27-and-under/jest-facade.d.ts +41 -41
- package/testing/jest/jest-28/jest-facade.d.ts +35 -53
- package/testing/jest/jest-29/jest-facade.d.ts +36 -55
- package/testing/package.json +1 -1
- package/testing/puppeteer/puppeteer-declarations.d.ts +0 -1
- package/testing/puppeteer/puppeteer-screenshot.d.ts +1 -1
- package/testing/testing-utils.d.ts +0 -1
|
@@ -20,6 +20,11 @@ and limitations under the License.
|
|
|
20
20
|
/// Window Iterable APIs
|
|
21
21
|
/////////////////////////////
|
|
22
22
|
|
|
23
|
+
interface AbortSignal {
|
|
24
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
|
25
|
+
any(signals: Iterable<AbortSignal>): AbortSignal;
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
interface AudioParam {
|
|
24
29
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueCurveAtTime) */
|
|
25
30
|
setValueCurveAtTime(values: Iterable<number>, startTime: number, duration: number): AudioParam;
|
|
@@ -83,6 +88,9 @@ interface CanvasPathDrawingStyles {
|
|
|
83
88
|
setLineDash(segments: Iterable<number>): void;
|
|
84
89
|
}
|
|
85
90
|
|
|
91
|
+
interface CustomStateSet extends Set<string> {
|
|
92
|
+
}
|
|
93
|
+
|
|
86
94
|
interface DOMRectList {
|
|
87
95
|
[Symbol.iterator](): IterableIterator<DOMRect>;
|
|
88
96
|
}
|
|
@@ -60,6 +60,8 @@ interface Array<T> {
|
|
|
60
60
|
* @param end If not specified, length of the this object is used as its default value.
|
|
61
61
|
*/
|
|
62
62
|
copyWithin(target: number, start: number, end?: number): this;
|
|
63
|
+
|
|
64
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
interface ArrayConstructor {
|
|
@@ -360,6 +362,8 @@ interface ReadonlyArray<T> {
|
|
|
360
362
|
* predicate. If it is not provided, undefined is used instead.
|
|
361
363
|
*/
|
|
362
364
|
findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number;
|
|
365
|
+
|
|
366
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
|
|
363
367
|
}
|
|
364
368
|
|
|
365
369
|
interface RegExp {
|
|
@@ -555,3 +559,39 @@ interface StringConstructor {
|
|
|
555
559
|
*/
|
|
556
560
|
raw(template: { raw: readonly string[] | ArrayLike<string>; }, ...substitutions: any[]): string;
|
|
557
561
|
}
|
|
562
|
+
|
|
563
|
+
interface Int8Array {
|
|
564
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
interface Uint8Array {
|
|
568
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
interface Uint8ClampedArray {
|
|
572
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
interface Int16Array {
|
|
576
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
interface Uint16Array {
|
|
580
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
interface Int32Array {
|
|
584
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
interface Uint32Array {
|
|
588
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
interface Float32Array {
|
|
592
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
interface Float64Array {
|
|
596
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
597
|
+
}
|
|
@@ -55,10 +55,22 @@ declare namespace Intl {
|
|
|
55
55
|
|
|
56
56
|
const PluralRules: PluralRulesConstructor;
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
interface NumberFormatPartTypeRegistry {
|
|
59
|
+
literal: never;
|
|
60
|
+
nan: never;
|
|
61
|
+
infinity: never;
|
|
62
|
+
percent: never;
|
|
63
|
+
integer: never;
|
|
64
|
+
group: never;
|
|
65
|
+
decimal: never;
|
|
66
|
+
fraction: never;
|
|
67
|
+
plusSign: never;
|
|
68
|
+
minusSign: never;
|
|
69
|
+
percentSign: never;
|
|
70
|
+
currency: never;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry;
|
|
62
74
|
|
|
63
75
|
interface NumberFormatPart {
|
|
64
76
|
type: NumberFormatPartTypes;
|
|
@@ -369,7 +369,7 @@ interface BigInt64Array {
|
|
|
369
369
|
subarray(begin?: number, end?: number): BigInt64Array;
|
|
370
370
|
|
|
371
371
|
/** Converts the array to a string by using the current locale. */
|
|
372
|
-
toLocaleString(): string;
|
|
372
|
+
toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
373
373
|
|
|
374
374
|
/** Returns a string representation of the array. */
|
|
375
375
|
toString(): string;
|
|
@@ -641,7 +641,7 @@ interface BigUint64Array {
|
|
|
641
641
|
subarray(begin?: number, end?: number): BigUint64Array;
|
|
642
642
|
|
|
643
643
|
/** Converts the array to a string by using the current locale. */
|
|
644
|
-
toLocaleString(): string;
|
|
644
|
+
toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
645
645
|
|
|
646
646
|
/** Returns a string representation of the array. */
|
|
647
647
|
toString(): string;
|
|
@@ -723,6 +723,5 @@ interface DataView {
|
|
|
723
723
|
declare namespace Intl {
|
|
724
724
|
interface NumberFormat {
|
|
725
725
|
format(value: number | bigint): string;
|
|
726
|
-
resolvedOptions(): ResolvedNumberFormatOptions;
|
|
727
726
|
}
|
|
728
727
|
}
|
|
@@ -241,24 +241,49 @@ declare namespace Intl {
|
|
|
241
241
|
): UnicodeBCP47LocaleIdentifier[];
|
|
242
242
|
};
|
|
243
243
|
|
|
244
|
+
interface NumberFormatOptionsStyleRegistry {
|
|
245
|
+
unit: never;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
interface NumberFormatOptionsCurrencyDisplayRegistry {
|
|
249
|
+
narrowSymbol: never;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
interface NumberFormatOptionsSignDisplayRegistry {
|
|
253
|
+
auto: never;
|
|
254
|
+
never: never;
|
|
255
|
+
always: never;
|
|
256
|
+
exceptZero: never;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry;
|
|
260
|
+
|
|
244
261
|
interface NumberFormatOptions {
|
|
262
|
+
numberingSystem?: string | undefined;
|
|
245
263
|
compactDisplay?: "short" | "long" | undefined;
|
|
246
264
|
notation?: "standard" | "scientific" | "engineering" | "compact" | undefined;
|
|
247
|
-
signDisplay?:
|
|
265
|
+
signDisplay?: NumberFormatOptionsSignDisplay | undefined;
|
|
248
266
|
unit?: string | undefined;
|
|
249
267
|
unitDisplay?: "short" | "long" | "narrow" | undefined;
|
|
250
|
-
|
|
251
|
-
currencySign?: string | undefined;
|
|
268
|
+
currencySign?: "standard" | "accounting" | undefined;
|
|
252
269
|
}
|
|
253
270
|
|
|
254
271
|
interface ResolvedNumberFormatOptions {
|
|
255
272
|
compactDisplay?: "short" | "long";
|
|
256
|
-
notation
|
|
257
|
-
signDisplay
|
|
273
|
+
notation: "standard" | "scientific" | "engineering" | "compact";
|
|
274
|
+
signDisplay: NumberFormatOptionsSignDisplay;
|
|
258
275
|
unit?: string;
|
|
259
276
|
unitDisplay?: "short" | "long" | "narrow";
|
|
260
|
-
|
|
261
|
-
|
|
277
|
+
currencySign?: "standard" | "accounting";
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
interface NumberFormatPartTypeRegistry {
|
|
281
|
+
compact: never;
|
|
282
|
+
exponentInteger: never;
|
|
283
|
+
exponentMinusSign: never;
|
|
284
|
+
exponentSeparator: never;
|
|
285
|
+
unit: never;
|
|
286
|
+
unknown: never;
|
|
262
287
|
}
|
|
263
288
|
|
|
264
289
|
interface DateTimeFormatOptions {
|
|
@@ -60,7 +60,7 @@ interface FinalizationRegistry<T> {
|
|
|
60
60
|
* @param unregisterToken The token that was used as the unregisterToken argument when calling
|
|
61
61
|
* register to register the target value.
|
|
62
62
|
*/
|
|
63
|
-
unregister(unregisterToken: WeakKey):
|
|
63
|
+
unregister(unregisterToken: WeakKey): boolean;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
interface FinalizationRegistryConstructor {
|
|
@@ -32,7 +32,7 @@ interface RegExpIndicesArray extends Array<[number, number]> {
|
|
|
32
32
|
|
|
33
33
|
interface RegExp {
|
|
34
34
|
/**
|
|
35
|
-
* Returns a Boolean value indicating the state of the hasIndices flag (d) used with
|
|
35
|
+
* Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression.
|
|
36
36
|
* Default is false. Read-only.
|
|
37
37
|
*/
|
|
38
38
|
readonly hasIndices: boolean;
|
package/compiler/lib.es2023.d.ts
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
declare namespace Intl {
|
|
20
|
+
interface NumberFormatOptionsUseGroupingRegistry {
|
|
21
|
+
min2: never;
|
|
22
|
+
auto: never;
|
|
23
|
+
always: never;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface NumberFormatOptionsSignDisplayRegistry {
|
|
27
|
+
negative: never;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface NumberFormatOptions {
|
|
31
|
+
roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined;
|
|
32
|
+
roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined;
|
|
33
|
+
roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined;
|
|
34
|
+
trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface ResolvedNumberFormatOptions {
|
|
38
|
+
roundingPriority: "auto" | "morePrecision" | "lessPrecision";
|
|
39
|
+
roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven";
|
|
40
|
+
roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000;
|
|
41
|
+
trailingZeroDisplay: "auto" | "stripIfInteger";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface NumberRangeFormatPart extends NumberFormatPart {
|
|
45
|
+
source: "startRange" | "endRange" | "shared";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity";
|
|
49
|
+
|
|
50
|
+
interface NumberFormat {
|
|
51
|
+
format(value: number | bigint | StringNumericLiteral): string;
|
|
52
|
+
formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[];
|
|
53
|
+
formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string;
|
|
54
|
+
formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[];
|
|
55
|
+
}
|
|
56
|
+
}
|
package/compiler/lib.es5.d.ts
CHANGED
|
@@ -818,7 +818,7 @@ interface Date {
|
|
|
818
818
|
getMilliseconds(): number;
|
|
819
819
|
/** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
|
|
820
820
|
getUTCMilliseconds(): number;
|
|
821
|
-
/** Gets the difference in minutes between the time on the local computer
|
|
821
|
+
/** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */
|
|
822
822
|
getTimezoneOffset(): number;
|
|
823
823
|
/**
|
|
824
824
|
* Sets the date and time value in the Date object.
|
|
@@ -4433,12 +4433,33 @@ declare namespace Intl {
|
|
|
4433
4433
|
|
|
4434
4434
|
var Collator: CollatorConstructor;
|
|
4435
4435
|
|
|
4436
|
+
interface NumberFormatOptionsStyleRegistry {
|
|
4437
|
+
decimal: never;
|
|
4438
|
+
percent: never;
|
|
4439
|
+
currency: never;
|
|
4440
|
+
}
|
|
4441
|
+
|
|
4442
|
+
type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry;
|
|
4443
|
+
|
|
4444
|
+
interface NumberFormatOptionsCurrencyDisplayRegistry {
|
|
4445
|
+
code: never;
|
|
4446
|
+
symbol: never;
|
|
4447
|
+
name: never;
|
|
4448
|
+
}
|
|
4449
|
+
|
|
4450
|
+
type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry;
|
|
4451
|
+
|
|
4452
|
+
interface NumberFormatOptionsUseGroupingRegistry {}
|
|
4453
|
+
|
|
4454
|
+
type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean;
|
|
4455
|
+
type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false;
|
|
4456
|
+
|
|
4436
4457
|
interface NumberFormatOptions {
|
|
4437
|
-
localeMatcher?:
|
|
4438
|
-
style?:
|
|
4458
|
+
localeMatcher?: "lookup" | "best fit" | undefined;
|
|
4459
|
+
style?: NumberFormatOptionsStyle | undefined;
|
|
4439
4460
|
currency?: string | undefined;
|
|
4440
|
-
|
|
4441
|
-
useGrouping?:
|
|
4461
|
+
currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined;
|
|
4462
|
+
useGrouping?: NumberFormatOptionsUseGrouping | undefined;
|
|
4442
4463
|
minimumIntegerDigits?: number | undefined;
|
|
4443
4464
|
minimumFractionDigits?: number | undefined;
|
|
4444
4465
|
maximumFractionDigits?: number | undefined;
|
|
@@ -4449,14 +4470,15 @@ declare namespace Intl {
|
|
|
4449
4470
|
interface ResolvedNumberFormatOptions {
|
|
4450
4471
|
locale: string;
|
|
4451
4472
|
numberingSystem: string;
|
|
4452
|
-
style:
|
|
4473
|
+
style: NumberFormatOptionsStyle;
|
|
4453
4474
|
currency?: string;
|
|
4475
|
+
currencyDisplay?: NumberFormatOptionsCurrencyDisplay;
|
|
4454
4476
|
minimumIntegerDigits: number;
|
|
4455
|
-
minimumFractionDigits
|
|
4456
|
-
maximumFractionDigits
|
|
4477
|
+
minimumFractionDigits?: number;
|
|
4478
|
+
maximumFractionDigits?: number;
|
|
4457
4479
|
minimumSignificantDigits?: number;
|
|
4458
4480
|
maximumSignificantDigits?: number;
|
|
4459
|
-
useGrouping:
|
|
4481
|
+
useGrouping: ResolvedNumberFormatOptionsUseGrouping;
|
|
4460
4482
|
}
|
|
4461
4483
|
|
|
4462
4484
|
interface NumberFormat {
|
|
@@ -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
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
interface ArrayConstructor {
|
|
20
|
+
/**
|
|
21
|
+
* Creates an array from an async iterator or iterable object.
|
|
22
|
+
* @param iterableOrArrayLike An async iterator or array-like object to convert to an array.
|
|
23
|
+
*/
|
|
24
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Creates an array from an async iterator or iterable object.
|
|
28
|
+
*
|
|
29
|
+
* @param iterableOrArrayLike An async iterator or array-like object to convert to an array.
|
|
30
|
+
* @param mapfn A mapping function to call on every element of itarableOrArrayLike.
|
|
31
|
+
* Each return value is awaited before being added to result array.
|
|
32
|
+
* @param thisArg Value of 'this' used when executing mapfn.
|
|
33
|
+
*/
|
|
34
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
35
|
+
}
|
|
@@ -27,3 +27,80 @@ interface MapConstructor {
|
|
|
27
27
|
keySelector: (item: T, index: number) => K,
|
|
28
28
|
): Map<K, T[]>;
|
|
29
29
|
}
|
|
30
|
+
|
|
31
|
+
interface ReadonlySetLike<T> {
|
|
32
|
+
/**
|
|
33
|
+
* Despite its name, returns an iterator of the values in the set-like.
|
|
34
|
+
*/
|
|
35
|
+
keys(): Iterator<T>;
|
|
36
|
+
/**
|
|
37
|
+
* @returns a boolean indicating whether an element with the specified value exists in the set-like or not.
|
|
38
|
+
*/
|
|
39
|
+
has(value: T): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* @returns the number of (unique) elements in the set-like.
|
|
42
|
+
*/
|
|
43
|
+
readonly size: number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface Set<T> {
|
|
47
|
+
/**
|
|
48
|
+
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
|
|
49
|
+
*/
|
|
50
|
+
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
51
|
+
/**
|
|
52
|
+
* @returns a new Set containing all the elements which are both in this Set and in the argument.
|
|
53
|
+
*/
|
|
54
|
+
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
|
|
55
|
+
/**
|
|
56
|
+
* @returns a new Set containing all the elements in this Set which are not also in the argument.
|
|
57
|
+
*/
|
|
58
|
+
difference<U>(other: ReadonlySetLike<U>): Set<T>;
|
|
59
|
+
/**
|
|
60
|
+
* @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
|
|
61
|
+
*/
|
|
62
|
+
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
63
|
+
/**
|
|
64
|
+
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
|
|
65
|
+
*/
|
|
66
|
+
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
|
|
69
|
+
*/
|
|
70
|
+
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* @returns a boolean indicating whether this Set has no elements in common with the argument.
|
|
73
|
+
*/
|
|
74
|
+
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface ReadonlySet<T> {
|
|
78
|
+
/**
|
|
79
|
+
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
|
|
80
|
+
*/
|
|
81
|
+
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
82
|
+
/**
|
|
83
|
+
* @returns a new Set containing all the elements which are both in this Set and in the argument.
|
|
84
|
+
*/
|
|
85
|
+
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
|
|
86
|
+
/**
|
|
87
|
+
* @returns a new Set containing all the elements in this Set which are not also in the argument.
|
|
88
|
+
*/
|
|
89
|
+
difference<U>(other: ReadonlySetLike<U>): Set<T>;
|
|
90
|
+
/**
|
|
91
|
+
* @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
|
|
92
|
+
*/
|
|
93
|
+
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
94
|
+
/**
|
|
95
|
+
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
|
|
96
|
+
*/
|
|
97
|
+
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
|
|
100
|
+
*/
|
|
101
|
+
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* @returns a boolean indicating whether this Set has no elements in common with the argument.
|
|
104
|
+
*/
|
|
105
|
+
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
|
|
106
|
+
}
|
package/compiler/lib.esnext.d.ts
CHANGED
|
@@ -23,3 +23,6 @@ and limitations under the License.
|
|
|
23
23
|
/// <reference lib="esnext.promise" />
|
|
24
24
|
/// <reference lib="esnext.object" />
|
|
25
25
|
/// <reference lib="esnext.collection" />
|
|
26
|
+
/// <reference lib="esnext.array" />
|
|
27
|
+
/// <reference lib="esnext.regexp" />
|
|
28
|
+
/// <reference lib="esnext.string" />
|
|
@@ -17,12 +17,5 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
declare namespace Intl {
|
|
20
|
-
|
|
21
|
-
source: "startRange" | "endRange" | "shared";
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
interface NumberFormat {
|
|
25
|
-
formatRange(start: number | bigint, end: number | bigint): string;
|
|
26
|
-
formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
|
|
27
|
-
}
|
|
20
|
+
// Empty
|
|
28
21
|
}
|
|
@@ -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
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
interface RegExp {
|
|
20
|
+
/**
|
|
21
|
+
* Returns a Boolean value indicating the state of the unicodeSets flag (v) used with a regular expression.
|
|
22
|
+
* Default is false. Read-only.
|
|
23
|
+
*/
|
|
24
|
+
readonly unicodeSets: boolean;
|
|
25
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 String {
|
|
20
|
+
/**
|
|
21
|
+
* Returns true if all leading surrogates and trailing surrogates appear paired and in order.
|
|
22
|
+
*/
|
|
23
|
+
isWellFormed(): boolean;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD).
|
|
27
|
+
*/
|
|
28
|
+
toWellFormed(): string;
|
|
29
|
+
}
|
|
@@ -26,3 +26,8 @@ interface FileSystemDirectoryHandle {
|
|
|
26
26
|
keys(): AsyncIterableIterator<string>;
|
|
27
27
|
values(): AsyncIterableIterator<FileSystemHandle>;
|
|
28
28
|
}
|
|
29
|
+
|
|
30
|
+
interface ReadableStream<R = any> {
|
|
31
|
+
[Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
|
|
32
|
+
values(options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
|
|
33
|
+
}
|
|
@@ -550,6 +550,17 @@ interface ReadableStreamGetReaderOptions {
|
|
|
550
550
|
mode?: ReadableStreamReaderMode;
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
+
interface ReadableStreamIteratorOptions {
|
|
554
|
+
/**
|
|
555
|
+
* Asynchronously iterates over the chunks in the stream's internal queue.
|
|
556
|
+
*
|
|
557
|
+
* Asynchronously iterating over the stream will lock it, preventing any other consumer from acquiring a reader. The lock will be released if the async iterator's return() method is called, e.g. by breaking out of the loop.
|
|
558
|
+
*
|
|
559
|
+
* By default, calling the async iterator's return() method will also cancel the stream. To prevent this, use the stream's values() method, passing true for the preventCancel option.
|
|
560
|
+
*/
|
|
561
|
+
preventCancel?: boolean;
|
|
562
|
+
}
|
|
563
|
+
|
|
553
564
|
interface ReadableStreamReadDoneResult<T> {
|
|
554
565
|
done: true;
|
|
555
566
|
value?: T;
|
|
@@ -647,16 +658,16 @@ interface RsaPssParams extends Algorithm {
|
|
|
647
658
|
interface SecurityPolicyViolationEventInit extends EventInit {
|
|
648
659
|
blockedURI?: string;
|
|
649
660
|
columnNumber?: number;
|
|
650
|
-
disposition
|
|
651
|
-
documentURI
|
|
652
|
-
effectiveDirective
|
|
661
|
+
disposition?: SecurityPolicyViolationEventDisposition;
|
|
662
|
+
documentURI?: string;
|
|
663
|
+
effectiveDirective?: string;
|
|
653
664
|
lineNumber?: number;
|
|
654
|
-
originalPolicy
|
|
665
|
+
originalPolicy?: string;
|
|
655
666
|
referrer?: string;
|
|
656
667
|
sample?: string;
|
|
657
668
|
sourceFile?: string;
|
|
658
|
-
statusCode
|
|
659
|
-
violatedDirective
|
|
669
|
+
statusCode?: number;
|
|
670
|
+
violatedDirective?: string;
|
|
660
671
|
}
|
|
661
672
|
|
|
662
673
|
interface StorageEstimate {
|
|
@@ -971,6 +982,8 @@ declare var AbortSignal: {
|
|
|
971
982
|
new(): AbortSignal;
|
|
972
983
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
|
|
973
984
|
abort(reason?: any): AbortSignal;
|
|
985
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
|
986
|
+
any(signals: AbortSignal[]): AbortSignal;
|
|
974
987
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
|
|
975
988
|
timeout(milliseconds: number): AbortSignal;
|
|
976
989
|
};
|
|
@@ -5221,6 +5234,7 @@ interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
|
|
|
5221
5234
|
|
|
5222
5235
|
/**
|
|
5223
5236
|
* This ServiceWorker API interface represents the global execution context of a service worker.
|
|
5237
|
+
* Available only in secure contexts.
|
|
5224
5238
|
*
|
|
5225
5239
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
|
|
5226
5240
|
*/
|
|
@@ -20,6 +20,11 @@ and limitations under the License.
|
|
|
20
20
|
/// Worker Iterable APIs
|
|
21
21
|
/////////////////////////////
|
|
22
22
|
|
|
23
|
+
interface AbortSignal {
|
|
24
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
|
25
|
+
any(signals: Iterable<AbortSignal>): AbortSignal;
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
interface CSSNumericArray {
|
|
24
29
|
[Symbol.iterator](): IterableIterator<CSSNumericValue>;
|
|
25
30
|
entries(): IterableIterator<[number, CSSNumericValue]>;
|