@stencil/core 3.0.0-alpha.0 → 3.0.0-alpha.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.
Files changed (50) hide show
  1. package/cli/index.cjs +4 -3
  2. package/cli/index.js +4 -3
  3. package/cli/package.json +1 -1
  4. package/compiler/lib.dom.d.ts +130 -185
  5. package/compiler/lib.dom.iterable.d.ts +1 -11
  6. package/compiler/lib.es2015.collection.d.ts +62 -1
  7. package/compiler/lib.es2015.proxy.d.ts +91 -2
  8. package/compiler/lib.es2017.intl.d.ts +16 -1
  9. package/compiler/lib.es2020.intl.d.ts +30 -5
  10. package/compiler/lib.es2021.intl.d.ts +11 -3
  11. package/compiler/lib.es2022.d.ts +1 -0
  12. package/compiler/lib.es2022.error.d.ts +2 -2
  13. package/compiler/lib.es2022.sharedmemory.d.ts +27 -0
  14. package/compiler/lib.es5.d.ts +13 -1
  15. package/compiler/lib.esnext.intl.d.ts +5 -1
  16. package/compiler/lib.webworker.d.ts +56 -29
  17. package/compiler/lib.webworker.iterable.d.ts +1 -1
  18. package/compiler/package.json +1 -1
  19. package/compiler/stencil.js +22807 -22740
  20. package/compiler/stencil.min.js +2 -2
  21. package/dependencies.json +2 -1
  22. package/dev-server/client/index.js +1 -1
  23. package/dev-server/client/package.json +1 -1
  24. package/dev-server/connector.html +2 -2
  25. package/dev-server/index.js +1 -1
  26. package/dev-server/package.json +1 -1
  27. package/dev-server/server-process.js +2 -2
  28. package/internal/app-data/package.json +1 -1
  29. package/internal/client/css-shim.js +1 -1
  30. package/internal/client/dom.js +1 -1
  31. package/internal/client/index.js +1 -1
  32. package/internal/client/package.json +1 -1
  33. package/internal/client/patch-browser.js +1 -1
  34. package/internal/client/patch-esm.js +1 -1
  35. package/internal/client/shadow-css.js +1 -1
  36. package/internal/hydrate/package.json +1 -1
  37. package/internal/package.json +1 -1
  38. package/internal/stencil-private.d.ts +1 -0
  39. package/internal/testing/package.json +1 -1
  40. package/mock-doc/index.cjs +1 -1
  41. package/mock-doc/index.js +1 -1
  42. package/mock-doc/package.json +1 -1
  43. package/package.json +4 -4
  44. package/screenshot/package.json +1 -1
  45. package/sys/node/index.js +3 -3
  46. package/sys/node/package.json +1 -1
  47. package/sys/node/worker.js +1 -1
  48. package/testing/index.js +597 -410
  49. package/testing/package.json +1 -1
  50. package/testing/puppeteer/puppeteer-element.d.ts +3 -3
@@ -19,18 +19,38 @@ and limitations under the License.
19
19
 
20
20
 
21
21
  interface Map<K, V> {
22
+
22
23
  clear(): void;
24
+ /**
25
+ * @returns true if an element in the Map existed and has been removed, or false if the element does not exist.
26
+ */
23
27
  delete(key: K): boolean;
28
+ /**
29
+ * Executes a provided function once per each key/value pair in the Map, in insertion order.
30
+ */
24
31
  forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
32
+ /**
33
+ * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
34
+ * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.
35
+ */
25
36
  get(key: K): V | undefined;
37
+ /**
38
+ * @returns boolean indicating whether an element with the specified key exists or not.
39
+ */
26
40
  has(key: K): boolean;
41
+ /**
42
+ * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
43
+ */
27
44
  set(key: K, value: V): this;
45
+ /**
46
+ * @returns the number of elements in the Map.
47
+ */
28
48
  readonly size: number;
29
49
  }
30
50
 
31
51
  interface MapConstructor {
32
52
  new(): Map<any, any>;
33
- new<K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
53
+ new <K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
34
54
  readonly prototype: Map<any, any>;
35
55
  }
36
56
  declare var Map: MapConstructor;
@@ -43,9 +63,23 @@ interface ReadonlyMap<K, V> {
43
63
  }
44
64
 
45
65
  interface WeakMap<K extends object, V> {
66
+ /**
67
+ * Removes the specified element from the WeakMap.
68
+ * @returns true if the element was successfully removed, or false if it was not present.
69
+ */
46
70
  delete(key: K): boolean;
71
+ /**
72
+ * @returns a specified element.
73
+ */
47
74
  get(key: K): V | undefined;
75
+ /**
76
+ * @returns a boolean indicating whether an element with the specified key exists or not.
77
+ */
48
78
  has(key: K): boolean;
79
+ /**
80
+ * Adds a new element with a specified key and value.
81
+ * @param key Must be an object.
82
+ */
49
83
  set(key: K, value: V): this;
50
84
  }
51
85
 
@@ -56,11 +90,28 @@ interface WeakMapConstructor {
56
90
  declare var WeakMap: WeakMapConstructor;
57
91
 
58
92
  interface Set<T> {
93
+ /**
94
+ * Appends a new element with a specified value to the end of the Set.
95
+ */
59
96
  add(value: T): this;
97
+
60
98
  clear(): void;
99
+ /**
100
+ * Removes a specified value from the Set.
101
+ * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist.
102
+ */
61
103
  delete(value: T): boolean;
104
+ /**
105
+ * Executes a provided function once per each value in the Set object, in insertion order.
106
+ */
62
107
  forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
108
+ /**
109
+ * @returns a boolean indicating whether an element with the specified value exists in the Set or not.
110
+ */
63
111
  has(value: T): boolean;
112
+ /**
113
+ * @returns the number of (unique) elements in Set.
114
+ */
64
115
  readonly size: number;
65
116
  }
66
117
 
@@ -77,8 +128,18 @@ interface ReadonlySet<T> {
77
128
  }
78
129
 
79
130
  interface WeakSet<T extends object> {
131
+ /**
132
+ * Appends a new object to the end of the WeakSet.
133
+ */
80
134
  add(value: T): this;
135
+ /**
136
+ * Removes the specified element from the WeakSet.
137
+ * @returns Returns true if the element existed and has been removed, or false if the element does not exist.
138
+ */
81
139
  delete(value: T): boolean;
140
+ /**
141
+ * @returns a boolean indicating whether an object exists in the WeakSet or not.
142
+ */
82
143
  has(value: T): boolean;
83
144
  }
84
145
 
@@ -19,23 +19,112 @@ and limitations under the License.
19
19
 
20
20
 
21
21
  interface ProxyHandler<T extends object> {
22
+ /**
23
+ * A trap method for a function call.
24
+ * @param target The original callable object which is being proxied.
25
+ */
22
26
  apply?(target: T, thisArg: any, argArray: any[]): any;
27
+
28
+ /**
29
+ * A trap for the `new` operator.
30
+ * @param target The original object which is being proxied.
31
+ * @param newTarget The constructor that was originally called.
32
+ */
23
33
  construct?(target: T, argArray: any[], newTarget: Function): object;
24
- defineProperty?(target: T, p: string | symbol, attributes: PropertyDescriptor): boolean;
34
+
35
+ /**
36
+ * A trap for `Object.defineProperty()`.
37
+ * @param target The original object which is being proxied.
38
+ * @returns A `Boolean` indicating whether or not the property has been defined.
39
+ */
40
+ defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean;
41
+
42
+ /**
43
+ * A trap for the `delete` operator.
44
+ * @param target The original object which is being proxied.
45
+ * @param p The name or `Symbol` of the property to delete.
46
+ * @returns A `Boolean` indicating whether or not the property was deleted.
47
+ */
25
48
  deleteProperty?(target: T, p: string | symbol): boolean;
49
+
50
+ /**
51
+ * A trap for getting a property value.
52
+ * @param target The original object which is being proxied.
53
+ * @param p The name or `Symbol` of the property to get.
54
+ * @param receiver The proxy or an object that inherits from the proxy.
55
+ */
26
56
  get?(target: T, p: string | symbol, receiver: any): any;
57
+
58
+ /**
59
+ * A trap for `Object.getOwnPropertyDescriptor()`.
60
+ * @param target The original object which is being proxied.
61
+ * @param p The name of the property whose description should be retrieved.
62
+ */
27
63
  getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined;
64
+
65
+ /**
66
+ * A trap for the `[[GetPrototypeOf]]` internal method.
67
+ * @param target The original object which is being proxied.
68
+ */
28
69
  getPrototypeOf?(target: T): object | null;
70
+
71
+ /**
72
+ * A trap for the `in` operator.
73
+ * @param target The original object which is being proxied.
74
+ * @param p The name or `Symbol` of the property to check for existence.
75
+ */
29
76
  has?(target: T, p: string | symbol): boolean;
77
+
78
+ /**
79
+ * A trap for `Object.isExtensible()`.
80
+ * @param target The original object which is being proxied.
81
+ */
30
82
  isExtensible?(target: T): boolean;
83
+
84
+ /**
85
+ * A trap for `Reflect.ownKeys()`.
86
+ * @param target The original object which is being proxied.
87
+ */
31
88
  ownKeys?(target: T): ArrayLike<string | symbol>;
89
+
90
+ /**
91
+ * A trap for `Object.preventExtensions()`.
92
+ * @param target The original object which is being proxied.
93
+ */
32
94
  preventExtensions?(target: T): boolean;
33
- set?(target: T, p: string | symbol, value: any, receiver: any): boolean;
95
+
96
+ /**
97
+ * A trap for setting a property value.
98
+ * @param target The original object which is being proxied.
99
+ * @param p The name or `Symbol` of the property to set.
100
+ * @param receiver The object to which the assignment was originally directed.
101
+ * @returns `A `Boolean` indicating whether or not the property was set.
102
+ */
103
+ set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean;
104
+
105
+ /**
106
+ * A trap for `Object.setPrototypeOf()`.
107
+ * @param target The original object which is being proxied.
108
+ * @param newPrototype The object's new prototype or `null`.
109
+ */
34
110
  setPrototypeOf?(target: T, v: object | null): boolean;
35
111
  }
36
112
 
37
113
  interface ProxyConstructor {
114
+ /**
115
+ * Creates a revocable Proxy object.
116
+ * @param target A target object to wrap with Proxy.
117
+ * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it.
118
+ */
38
119
  revocable<T extends object>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
120
+
121
+ /**
122
+ * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the
123
+ * original object, but which may redefine fundamental Object operations like getting, setting, and defining
124
+ * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs.
125
+ * @param target A target object to wrap with Proxy.
126
+ * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it.
127
+ */
39
128
  new <T extends object>(target: T, handler: ProxyHandler<T>): T;
40
129
  }
41
130
  declare var Proxy: ProxyConstructor;
@@ -19,7 +19,22 @@ and limitations under the License.
19
19
 
20
20
 
21
21
  declare namespace Intl {
22
- type DateTimeFormatPartTypes = "day" | "dayPeriod" | "era" | "hour" | "literal" | "minute" | "month" | "second" | "timeZoneName" | "weekday" | "year";
22
+
23
+ interface DateTimeFormatPartTypesRegistry {
24
+ day: any
25
+ dayPeriod: any
26
+ era: any
27
+ hour: any
28
+ literal: any
29
+ minute: any
30
+ month: any
31
+ second: any
32
+ timeZoneName: any
33
+ weekday: any
34
+ year: any
35
+ }
36
+
37
+ type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry;
23
38
 
24
39
  interface DateTimeFormatPart {
25
40
  type: DateTimeFormatPartTypes;
@@ -18,6 +18,7 @@ and limitations under the License.
18
18
  /// <reference no-default-lib="true"/>
19
19
 
20
20
 
21
+ /// <reference lib="es2018.intl" />
21
22
  declare namespace Intl {
22
23
 
23
24
  /**
@@ -50,6 +51,25 @@ declare namespace Intl {
50
51
  | "second"
51
52
  | "seconds";
52
53
 
54
+ /**
55
+ * Value of the `unit` property in objects returned by
56
+ * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and
57
+ * `format` methods accept either singular or plural unit names as input,
58
+ * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g.
59
+ * "days").
60
+ *
61
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts).
62
+ */
63
+ type RelativeTimeFormatUnitSingular =
64
+ | "year"
65
+ | "quarter"
66
+ | "month"
67
+ | "week"
68
+ | "day"
69
+ | "hour"
70
+ | "minute"
71
+ | "second";
72
+
53
73
  /**
54
74
  * The locale matching algorithm to use.
55
75
  *
@@ -120,11 +140,16 @@ declare namespace Intl {
120
140
  *
121
141
  * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts).
122
142
  */
123
- interface RelativeTimeFormatPart {
124
- type: string;
125
- value: string;
126
- unit?: RelativeTimeFormatUnit;
127
- }
143
+ type RelativeTimeFormatPart =
144
+ | {
145
+ type: "literal";
146
+ value: string;
147
+ }
148
+ | {
149
+ type: Exclude<NumberFormatPartTypes, "literal">;
150
+ value: string;
151
+ unit: RelativeTimeFormatUnitSingular;
152
+ };
128
153
 
129
154
  interface RelativeTimeFormat {
130
155
  /**
@@ -20,17 +20,25 @@ and limitations under the License.
20
20
 
21
21
  declare namespace Intl {
22
22
 
23
+ interface DateTimeFormatPartTypesRegistry {
24
+ fractionalSecond: any
25
+ }
26
+
23
27
  interface DateTimeFormatOptions {
24
28
  formatMatcher?: "basic" | "best fit" | "best fit" | undefined;
25
29
  dateStyle?: "full" | "long" | "medium" | "short" | undefined;
26
30
  timeStyle?: "full" | "long" | "medium" | "short" | undefined;
27
31
  dayPeriod?: "narrow" | "short" | "long" | undefined;
28
- fractionalSecondDigits?: 0 | 1 | 2 | 3 | undefined;
32
+ fractionalSecondDigits?: 1 | 2 | 3 | undefined;
33
+ }
34
+
35
+ interface DateTimeRangeFormatPart extends DateTimeFormatPart {
36
+ source: "startRange" | "endRange" | "shared"
29
37
  }
30
38
 
31
39
  interface DateTimeFormat {
32
40
  formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string;
33
- formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeFormatPart[];
41
+ formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[];
34
42
  }
35
43
 
36
44
  interface ResolvedDateTimeFormatOptions {
@@ -39,7 +47,7 @@ declare namespace Intl {
39
47
  timeStyle?: "full" | "long" | "medium" | "short";
40
48
  hourCycle?: "h11" | "h12" | "h23" | "h24";
41
49
  dayPeriod?: "narrow" | "short" | "long";
42
- fractionalSecondDigits?: 0 | 1 | 2 | 3;
50
+ fractionalSecondDigits?: 1 | 2 | 3;
43
51
  }
44
52
 
45
53
  /**
@@ -23,4 +23,5 @@ and limitations under the License.
23
23
  /// <reference lib="es2022.error" />
24
24
  /// <reference lib="es2022.intl" />
25
25
  /// <reference lib="es2022.object" />
26
+ /// <reference lib="es2022.sharedmemory" />
26
27
  /// <reference lib="es2022.string" />
@@ -19,11 +19,11 @@ and limitations under the License.
19
19
 
20
20
 
21
21
  interface ErrorOptions {
22
- cause?: Error;
22
+ cause?: unknown;
23
23
  }
24
24
 
25
25
  interface Error {
26
- cause?: Error;
26
+ cause?: unknown;
27
27
  }
28
28
 
29
29
  interface ErrorConstructor {
@@ -0,0 +1,27 @@
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 Atomics {
22
+ /**
23
+ * A non-blocking, asynchronous version of wait which is usable on the main thread.
24
+ * Waits asynchronously on a shared memory location and returns a Promise
25
+ */
26
+ waitAsync(typedArray: BigInt64Array | Int32Array, index: number, value: bigint, timeout?: number): { async: false, value: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "not-equal" | "timed-out"> };
27
+ }
@@ -933,12 +933,24 @@ interface DateConstructor {
933
933
  declare var Date: DateConstructor;
934
934
 
935
935
  interface RegExpMatchArray extends Array<string> {
936
+ /**
937
+ * The index of the search at which the result was found.
938
+ */
936
939
  index?: number;
940
+ /**
941
+ * A copy of the search string.
942
+ */
937
943
  input?: string;
938
944
  }
939
945
 
940
946
  interface RegExpExecArray extends Array<string> {
947
+ /**
948
+ * The index of the search at which the result was found.
949
+ */
941
950
  index: number;
951
+ /**
952
+ * A copy of the search string.
953
+ */
942
954
  input: string;
943
955
  }
944
956
 
@@ -1584,7 +1596,7 @@ type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
1584
1596
  /**
1585
1597
  * Exclude null and undefined from T
1586
1598
  */
1587
- type NonNullable<T> = T extends null | undefined ? never : T;
1599
+ type NonNullable<T> = T & {};
1588
1600
 
1589
1601
  /**
1590
1602
  * 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
  }
@@ -271,6 +271,10 @@ interface IDBObjectStoreParameters {
271
271
  keyPath?: string | string[] | null;
272
272
  }
273
273
 
274
+ interface IDBTransactionOptions {
275
+ durability?: IDBTransactionDurability;
276
+ }
277
+
274
278
  interface IDBVersionChangeEventInit extends EventInit {
275
279
  newVersion?: number | null;
276
280
  oldVersion?: number;
@@ -496,12 +500,12 @@ interface RTCEncodedVideoFrameMetadata {
496
500
  width?: number;
497
501
  }
498
502
 
499
- interface ReadableStreamDefaultReadDoneResult {
503
+ interface ReadableStreamReadDoneResult {
500
504
  done: true;
501
505
  value?: undefined;
502
506
  }
503
507
 
504
- interface ReadableStreamDefaultReadValueResult<T> {
508
+ interface ReadableStreamReadValueResult<T> {
505
509
  done: false;
506
510
  value: T;
507
511
  }
@@ -1004,6 +1008,7 @@ declare var CustomEvent: {
1004
1008
 
1005
1009
  /** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */
1006
1010
  interface DOMException extends Error {
1011
+ /** @deprecated */
1007
1012
  readonly code: number;
1008
1013
  readonly message: string;
1009
1014
  readonly name: string;
@@ -1466,7 +1471,7 @@ declare var EventTarget: {
1466
1471
 
1467
1472
  /** Extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries. */
1468
1473
  interface ExtendableEvent extends Event {
1469
- waitUntil(f: any): void;
1474
+ waitUntil(f: Promise<any>): void;
1470
1475
  }
1471
1476
 
1472
1477
  declare var ExtendableEvent: {
@@ -1801,7 +1806,7 @@ interface IDBDatabase extends EventTarget {
1801
1806
  */
1802
1807
  deleteObjectStore(name: string): void;
1803
1808
  /** Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. */
1804
- transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction;
1809
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
1805
1810
  addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1806
1811
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1807
1812
  removeEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@@ -2287,7 +2292,6 @@ interface NavigatorID {
2287
2292
  readonly appName: string;
2288
2293
  /** @deprecated */
2289
2294
  readonly appVersion: string;
2290
- /** @deprecated */
2291
2295
  readonly platform: string;
2292
2296
  /** @deprecated */
2293
2297
  readonly product: string;
@@ -2304,10 +2308,6 @@ interface NavigatorLocks {
2304
2308
  readonly locks: LockManager;
2305
2309
  }
2306
2310
 
2307
- interface NavigatorNetworkInformation {
2308
- readonly connection: NetworkInformation;
2309
- }
2310
-
2311
2311
  interface NavigatorOnLine {
2312
2312
  readonly onLine: boolean;
2313
2313
  }
@@ -2317,15 +2317,6 @@ interface NavigatorStorage {
2317
2317
  readonly storage: StorageManager;
2318
2318
  }
2319
2319
 
2320
- interface NetworkInformation extends EventTarget {
2321
- readonly type: ConnectionType;
2322
- }
2323
-
2324
- declare var NetworkInformation: {
2325
- prototype: NetworkInformation;
2326
- new(): NetworkInformation;
2327
- };
2328
-
2329
2320
  interface NotificationEventMap {
2330
2321
  "click": Event;
2331
2322
  "close": Event;
@@ -2658,6 +2649,7 @@ declare var PushMessageData: {
2658
2649
  */
2659
2650
  interface PushSubscription {
2660
2651
  readonly endpoint: string;
2652
+ readonly expirationTime: EpochTimeStamp | null;
2661
2653
  readonly options: PushSubscriptionOptions;
2662
2654
  getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
2663
2655
  toJSON(): PushSubscriptionJSON;
@@ -2702,6 +2694,19 @@ declare var RTCEncodedVideoFrame: {
2702
2694
  new(): RTCEncodedVideoFrame;
2703
2695
  };
2704
2696
 
2697
+ interface ReadableByteStreamController {
2698
+ readonly byobRequest: ReadableStreamBYOBRequest | null;
2699
+ readonly desiredSize: number | null;
2700
+ close(): void;
2701
+ enqueue(chunk: ArrayBufferView): void;
2702
+ error(e?: any): void;
2703
+ }
2704
+
2705
+ declare var ReadableByteStreamController: {
2706
+ prototype: ReadableByteStreamController;
2707
+ new(): ReadableByteStreamController;
2708
+ };
2709
+
2705
2710
  /** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */
2706
2711
  interface ReadableStream<R = any> {
2707
2712
  readonly locked: boolean;
@@ -2717,6 +2722,27 @@ declare var ReadableStream: {
2717
2722
  new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
2718
2723
  };
2719
2724
 
2725
+ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
2726
+ read(view: ArrayBufferView): Promise<ReadableStreamReadResult<ArrayBufferView>>;
2727
+ releaseLock(): void;
2728
+ }
2729
+
2730
+ declare var ReadableStreamBYOBReader: {
2731
+ prototype: ReadableStreamBYOBReader;
2732
+ new(stream: ReadableStream): ReadableStreamBYOBReader;
2733
+ };
2734
+
2735
+ interface ReadableStreamBYOBRequest {
2736
+ readonly view: ArrayBufferView | null;
2737
+ respond(bytesWritten: number): void;
2738
+ respondWithNewView(view: ArrayBufferView): void;
2739
+ }
2740
+
2741
+ declare var ReadableStreamBYOBRequest: {
2742
+ prototype: ReadableStreamBYOBRequest;
2743
+ new(): ReadableStreamBYOBRequest;
2744
+ };
2745
+
2720
2746
  interface ReadableStreamDefaultController<R = any> {
2721
2747
  readonly desiredSize: number | null;
2722
2748
  close(): void;
@@ -2730,7 +2756,7 @@ declare var ReadableStreamDefaultController: {
2730
2756
  };
2731
2757
 
2732
2758
  interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
2733
- read(): Promise<ReadableStreamDefaultReadResult<R>>;
2759
+ read(): Promise<ReadableStreamReadResult<R>>;
2734
2760
  releaseLock(): void;
2735
2761
  }
2736
2762
 
@@ -2899,6 +2925,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
2899
2925
  onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
2900
2926
  onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
2901
2927
  readonly registration: ServiceWorkerRegistration;
2928
+ readonly serviceWorker: ServiceWorker;
2902
2929
  skipWaiting(): Promise<void>;
2903
2930
  addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2904
2931
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -2981,11 +3008,11 @@ declare var StorageManager: {
2981
3008
  * Available only in secure contexts.
2982
3009
  */
2983
3010
  interface SubtleCrypto {
2984
- decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
3011
+ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
2985
3012
  deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
2986
3013
  deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
2987
3014
  digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
2988
- encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
3015
+ encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
2989
3016
  exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
2990
3017
  exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
2991
3018
  generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
@@ -5278,8 +5305,8 @@ interface WindowOrWorkerGlobalScope {
5278
5305
  readonly performance: Performance;
5279
5306
  atob(data: string): string;
5280
5307
  btoa(data: string): string;
5281
- clearInterval(id?: number): void;
5282
- clearTimeout(id?: number): void;
5308
+ clearInterval(id: number | undefined): void;
5309
+ clearTimeout(id: number | undefined): void;
5283
5310
  createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5284
5311
  createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5285
5312
  fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
@@ -5371,7 +5398,7 @@ declare var WorkerLocation: {
5371
5398
  };
5372
5399
 
5373
5400
  /** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */
5374
- interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
5401
+ interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage {
5375
5402
  readonly mediaCapabilities: MediaCapabilities;
5376
5403
  }
5377
5404
 
@@ -5395,6 +5422,7 @@ declare var WritableStream: {
5395
5422
 
5396
5423
  /** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */
5397
5424
  interface WritableStreamDefaultController {
5425
+ readonly signal: AbortSignal;
5398
5426
  error(e?: any): void;
5399
5427
  }
5400
5428
 
@@ -5818,8 +5846,8 @@ declare var origin: string;
5818
5846
  declare var performance: Performance;
5819
5847
  declare function atob(data: string): string;
5820
5848
  declare function btoa(data: string): string;
5821
- declare function clearInterval(id?: number): void;
5822
- declare function clearTimeout(id?: number): void;
5849
+ declare function clearInterval(id: number | undefined): void;
5850
+ declare function clearTimeout(id: number | undefined): void;
5823
5851
  declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5824
5852
  declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5825
5853
  declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
@@ -5859,7 +5887,7 @@ type GLsizeiptr = number;
5859
5887
  type GLuint = number;
5860
5888
  type GLuint64 = number;
5861
5889
  type HashAlgorithmIdentifier = AlgorithmIdentifier;
5862
- type HeadersInit = string[][] | Record<string, string> | Headers;
5890
+ type HeadersInit = [string, string][] | Record<string, string> | Headers;
5863
5891
  type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[];
5864
5892
  type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
5865
5893
  type Int32List = Int32Array | GLint[];
@@ -5869,7 +5897,7 @@ type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
5869
5897
  type PerformanceEntryList = PerformanceEntry[];
5870
5898
  type PushMessageDataInit = BufferSource | string;
5871
5899
  type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
5872
- type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
5900
+ type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult;
5873
5901
  type ReadableStreamReader<T> = ReadableStreamDefaultReader<T>;
5874
5902
  type RequestInfo = Request | string;
5875
5903
  type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
@@ -5882,7 +5910,6 @@ type BinaryType = "arraybuffer" | "blob";
5882
5910
  type ClientTypes = "all" | "sharedworker" | "window" | "worker";
5883
5911
  type ColorGamut = "p3" | "rec2020" | "srgb";
5884
5912
  type ColorSpaceConversion = "default" | "none";
5885
- type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "mixed" | "none" | "other" | "unknown" | "wifi";
5886
5913
  type DocumentVisibilityState = "hidden" | "visible";
5887
5914
  type EndingType = "native" | "transparent";
5888
5915
  type FileSystemHandleKind = "directory" | "file";