@stencil/core 3.0.0-alpha.0 → 3.0.0-alpha.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.
- package/cli/config-flags.d.ts +16 -16
- package/cli/index.cjs +6 -4
- package/cli/index.js +6 -4
- package/cli/package.json +1 -1
- package/compiler/lib.dom.d.ts +434 -251
- package/compiler/lib.dom.iterable.d.ts +7 -13
- package/compiler/lib.es2015.collection.d.ts +62 -1
- package/compiler/lib.es2015.promise.d.ts +9 -4
- package/compiler/lib.es2015.proxy.d.ts +91 -2
- package/compiler/lib.es2015.reflect.d.ts +25 -2
- package/compiler/lib.es2015.symbol.wellknown.d.ts +3 -3
- package/compiler/lib.es2017.intl.d.ts +16 -1
- package/compiler/lib.es2019.d.ts +1 -0
- package/compiler/lib.es2019.intl.d.ts +25 -0
- package/compiler/lib.es2020.intl.d.ts +31 -6
- package/compiler/lib.es2021.intl.d.ts +11 -3
- package/compiler/lib.es2022.d.ts +1 -0
- package/compiler/lib.es2022.error.d.ts +2 -2
- package/compiler/lib.es2022.sharedmemory.d.ts +27 -0
- package/compiler/lib.es5.d.ts +39 -14
- package/compiler/lib.esnext.intl.d.ts +5 -1
- package/compiler/lib.webworker.d.ts +318 -55
- package/compiler/lib.webworker.iterable.d.ts +11 -3
- package/compiler/package.json +1 -1
- package/compiler/stencil.d.ts +1 -23
- package/compiler/stencil.js +12597 -11461
- package/compiler/stencil.min.js +2 -2
- package/compiler/sys/in-memory-fs.d.ts +3 -3
- package/compiler/transpile.d.ts +32 -0
- package/dependencies.json +3 -1
- package/dev-server/client/app-error.d.ts +1 -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/open-in-editor-api.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/css-shim.js +2 -2
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +1 -1
- 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/polyfills/css-shim.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +2 -2
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +4 -4
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +38 -37
- package/internal/stencil-public-compiler.d.ts +27 -27
- package/internal/stencil-public-runtime.d.ts +3 -3
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +1 -1
- package/mock-doc/index.d.ts +2 -2
- package/mock-doc/index.js +1 -1
- package/mock-doc/package.json +1 -1
- package/package.json +8 -8
- package/screenshot/package.json +1 -1
- package/sys/node/autoprefixer.js +1 -1
- package/sys/node/glob.js +1 -1
- package/sys/node/index.js +31 -44
- package/sys/node/package.json +1 -1
- package/sys/node/prompts.js +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +613 -420
- package/testing/jest/jest-preprocessor.d.ts +3 -3
- package/testing/package.json +1 -1
- package/testing/puppeteer/puppeteer-declarations.d.ts +4 -4
- package/testing/puppeteer/puppeteer-element.d.ts +3 -3
- package/testing/testing-utils.d.ts +1 -1
package/compiler/lib.es5.d.ts
CHANGED
|
@@ -214,12 +214,6 @@ interface ObjectConstructor {
|
|
|
214
214
|
*/
|
|
215
215
|
seal<T>(o: T): T;
|
|
216
216
|
|
|
217
|
-
/**
|
|
218
|
-
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
219
|
-
* @param a Object on which to lock the attributes.
|
|
220
|
-
*/
|
|
221
|
-
freeze<T>(a: T[]): readonly T[];
|
|
222
|
-
|
|
223
217
|
/**
|
|
224
218
|
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
225
219
|
* @param f Object on which to lock the attributes.
|
|
@@ -449,8 +443,8 @@ interface String {
|
|
|
449
443
|
|
|
450
444
|
/**
|
|
451
445
|
* Replaces text in a string, using a regular expression or search string.
|
|
452
|
-
* @param searchValue A string to search for.
|
|
453
|
-
* @param replaceValue A string containing the text to replace
|
|
446
|
+
* @param searchValue A string or regular expression to search for.
|
|
447
|
+
* @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced.
|
|
454
448
|
*/
|
|
455
449
|
replace(searchValue: string | RegExp, replaceValue: string): string;
|
|
456
450
|
|
|
@@ -908,7 +902,17 @@ interface Date {
|
|
|
908
902
|
interface DateConstructor {
|
|
909
903
|
new(): Date;
|
|
910
904
|
new(value: number | string): Date;
|
|
911
|
-
|
|
905
|
+
/**
|
|
906
|
+
* Creates a new Date.
|
|
907
|
+
* @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
|
|
908
|
+
* @param monthIndex The month as a number between 0 and 11 (January to December).
|
|
909
|
+
* @param date The date as a number between 1 and 31.
|
|
910
|
+
* @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
|
|
911
|
+
* @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
|
|
912
|
+
* @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
|
|
913
|
+
* @param ms A number from 0 to 999 that specifies the milliseconds.
|
|
914
|
+
*/
|
|
915
|
+
new(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
|
|
912
916
|
(): string;
|
|
913
917
|
readonly prototype: Date;
|
|
914
918
|
/**
|
|
@@ -919,27 +923,48 @@ interface DateConstructor {
|
|
|
919
923
|
/**
|
|
920
924
|
* Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
|
|
921
925
|
* @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
|
|
922
|
-
* @param
|
|
926
|
+
* @param monthIndex The month as a number between 0 and 11 (January to December).
|
|
923
927
|
* @param date The date as a number between 1 and 31.
|
|
924
928
|
* @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
|
|
925
929
|
* @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
|
|
926
930
|
* @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
|
|
927
931
|
* @param ms A number from 0 to 999 that specifies the milliseconds.
|
|
928
932
|
*/
|
|
929
|
-
UTC(year: number,
|
|
933
|
+
UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
|
|
934
|
+
/** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */
|
|
930
935
|
now(): number;
|
|
931
936
|
}
|
|
932
937
|
|
|
933
938
|
declare var Date: DateConstructor;
|
|
934
939
|
|
|
935
940
|
interface RegExpMatchArray extends Array<string> {
|
|
941
|
+
/**
|
|
942
|
+
* The index of the search at which the result was found.
|
|
943
|
+
*/
|
|
936
944
|
index?: number;
|
|
945
|
+
/**
|
|
946
|
+
* A copy of the search string.
|
|
947
|
+
*/
|
|
937
948
|
input?: string;
|
|
949
|
+
/**
|
|
950
|
+
* The first match. This will always be present because `null` will be returned if there are no matches.
|
|
951
|
+
*/
|
|
952
|
+
0: string;
|
|
938
953
|
}
|
|
939
954
|
|
|
940
955
|
interface RegExpExecArray extends Array<string> {
|
|
956
|
+
/**
|
|
957
|
+
* The index of the search at which the result was found.
|
|
958
|
+
*/
|
|
941
959
|
index: number;
|
|
960
|
+
/**
|
|
961
|
+
* A copy of the search string.
|
|
962
|
+
*/
|
|
942
963
|
input: string;
|
|
964
|
+
/**
|
|
965
|
+
* The first match. This will always be present because `null` will be returned if there are no matches.
|
|
966
|
+
*/
|
|
967
|
+
0: string;
|
|
943
968
|
}
|
|
944
969
|
|
|
945
970
|
interface RegExp {
|
|
@@ -1520,8 +1545,8 @@ interface Promise<T> {
|
|
|
1520
1545
|
*/
|
|
1521
1546
|
type Awaited<T> =
|
|
1522
1547
|
T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
|
|
1523
|
-
T extends object & { then(onfulfilled: infer F): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
|
|
1524
|
-
F extends ((value: infer V, ...args:
|
|
1548
|
+
T extends object & { then(onfulfilled: infer F, ...args: infer _): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
|
|
1549
|
+
F extends ((value: infer V, ...args: infer _) => any) ? // if the argument to `then` is callable, extracts the first argument
|
|
1525
1550
|
Awaited<V> : // recursively unwrap the value
|
|
1526
1551
|
never : // the argument to `then` was not callable
|
|
1527
1552
|
T; // non-object or non-thenable
|
|
@@ -1584,7 +1609,7 @@ type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
|
|
|
1584
1609
|
/**
|
|
1585
1610
|
* Exclude null and undefined from T
|
|
1586
1611
|
*/
|
|
1587
|
-
type NonNullable<T> = T
|
|
1612
|
+
type NonNullable<T> = T & {};
|
|
1588
1613
|
|
|
1589
1614
|
/**
|
|
1590
1615
|
* Obtain the parameters of a function type in a tuple
|
|
@@ -19,8 +19,12 @@ and limitations under the License.
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
declare namespace Intl {
|
|
22
|
+
interface NumberRangeFormatPart extends NumberFormatPart {
|
|
23
|
+
source: "startRange" | "endRange" | "shared"
|
|
24
|
+
}
|
|
25
|
+
|
|
22
26
|
interface NumberFormat {
|
|
23
27
|
formatRange(start: number | bigint, end: number | bigint): string;
|
|
24
|
-
formatRangeToParts(start: number | bigint, end: number | bigint):
|
|
28
|
+
formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
|
|
25
29
|
}
|
|
26
30
|
}
|