@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.
Files changed (73) hide show
  1. package/cli/config-flags.d.ts +16 -16
  2. package/cli/index.cjs +6 -4
  3. package/cli/index.js +6 -4
  4. package/cli/package.json +1 -1
  5. package/compiler/lib.dom.d.ts +434 -251
  6. package/compiler/lib.dom.iterable.d.ts +7 -13
  7. package/compiler/lib.es2015.collection.d.ts +62 -1
  8. package/compiler/lib.es2015.promise.d.ts +9 -4
  9. package/compiler/lib.es2015.proxy.d.ts +91 -2
  10. package/compiler/lib.es2015.reflect.d.ts +25 -2
  11. package/compiler/lib.es2015.symbol.wellknown.d.ts +3 -3
  12. package/compiler/lib.es2017.intl.d.ts +16 -1
  13. package/compiler/lib.es2019.d.ts +1 -0
  14. package/compiler/lib.es2019.intl.d.ts +25 -0
  15. package/compiler/lib.es2020.intl.d.ts +31 -6
  16. package/compiler/lib.es2021.intl.d.ts +11 -3
  17. package/compiler/lib.es2022.d.ts +1 -0
  18. package/compiler/lib.es2022.error.d.ts +2 -2
  19. package/compiler/lib.es2022.sharedmemory.d.ts +27 -0
  20. package/compiler/lib.es5.d.ts +39 -14
  21. package/compiler/lib.esnext.intl.d.ts +5 -1
  22. package/compiler/lib.webworker.d.ts +318 -55
  23. package/compiler/lib.webworker.iterable.d.ts +11 -3
  24. package/compiler/package.json +1 -1
  25. package/compiler/stencil.d.ts +1 -23
  26. package/compiler/stencil.js +12597 -11461
  27. package/compiler/stencil.min.js +2 -2
  28. package/compiler/sys/in-memory-fs.d.ts +3 -3
  29. package/compiler/transpile.d.ts +32 -0
  30. package/dependencies.json +3 -1
  31. package/dev-server/client/app-error.d.ts +1 -1
  32. package/dev-server/client/index.js +1 -1
  33. package/dev-server/client/package.json +1 -1
  34. package/dev-server/connector.html +2 -2
  35. package/dev-server/index.js +1 -1
  36. package/dev-server/open-in-editor-api.js +1 -1
  37. package/dev-server/package.json +1 -1
  38. package/dev-server/server-process.js +2 -2
  39. package/internal/app-data/package.json +1 -1
  40. package/internal/client/css-shim.js +2 -2
  41. package/internal/client/dom.js +1 -1
  42. package/internal/client/index.js +1 -1
  43. package/internal/client/package.json +1 -1
  44. package/internal/client/patch-browser.js +1 -1
  45. package/internal/client/patch-esm.js +1 -1
  46. package/internal/client/polyfills/css-shim.js +1 -1
  47. package/internal/client/shadow-css.js +1 -1
  48. package/internal/hydrate/index.js +2 -2
  49. package/internal/hydrate/package.json +1 -1
  50. package/internal/hydrate/runner.js +4 -4
  51. package/internal/package.json +1 -1
  52. package/internal/stencil-private.d.ts +38 -37
  53. package/internal/stencil-public-compiler.d.ts +27 -27
  54. package/internal/stencil-public-runtime.d.ts +3 -3
  55. package/internal/testing/package.json +1 -1
  56. package/mock-doc/index.cjs +1 -1
  57. package/mock-doc/index.d.ts +2 -2
  58. package/mock-doc/index.js +1 -1
  59. package/mock-doc/package.json +1 -1
  60. package/package.json +8 -8
  61. package/screenshot/package.json +1 -1
  62. package/sys/node/autoprefixer.js +1 -1
  63. package/sys/node/glob.js +1 -1
  64. package/sys/node/index.js +31 -44
  65. package/sys/node/package.json +1 -1
  66. package/sys/node/prompts.js +1 -1
  67. package/sys/node/worker.js +1 -1
  68. package/testing/index.js +613 -420
  69. package/testing/jest/jest-preprocessor.d.ts +3 -3
  70. package/testing/package.json +1 -1
  71. package/testing/puppeteer/puppeteer-declarations.d.ts +4 -4
  72. package/testing/puppeteer/puppeteer-element.d.ts +3 -3
  73. package/testing/testing-utils.d.ts +1 -1
@@ -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 for every successful match of searchValue in this string.
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
- new(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
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 month The month as a number between 0 and 11 (January to December).
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, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): 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: any) => any) ? // if the argument to `then` is callable, extracts the first argument
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 extends null | undefined ? never : 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): NumberFormatPart[];
28
+ formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
25
29
  }
26
30
  }