diff --git a/baselines/audioworklet.generated.d.ts b/baselines/audioworklet.generated.d.ts index dc7ea4402..130ce5189 100644 --- a/baselines/audioworklet.generated.d.ts +++ b/baselines/audioworklet.generated.d.ts @@ -962,6 +962,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream>; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: AsyncIterable | Iterable): ReadableStream; }; /** diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 2120bb2f3..8df458604 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -1273,6 +1273,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -4068,6 +4074,8 @@ declare var AnimationEffect: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEvent) */ interface AnimationEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEvent/animation) */ + readonly animation: CSSAnimation | null; /** * The **`AnimationEvent.animationName`** read-only property is a string containing the value of the animation-name CSS property associated with the transition. * @@ -21122,6 +21130,23 @@ declare var HTMLSelectElement: { new(): HTMLSelectElement; }; +/** + * The **`HTMLSelectedContentElement`** interface represents a element in the DOM. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectedContentElement) + */ +interface HTMLSelectedContentElement extends HTMLElement { + addEventListener(type: K, listener: (this: HTMLSelectedContentElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLSelectedContentElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var HTMLSelectedContentElement: { + prototype: HTMLSelectedContentElement; + new(): HTMLSelectedContentElement; +}; + /** * The **`HTMLSlotElement`** interface of the Shadow DOM API enables access to the name and assigned nodes of an HTML element. * @@ -21827,6 +21852,8 @@ interface HTMLTemplateElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootSerializable) */ shadowRootSerializable: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootSlotAssignment) */ + shadowRootSlotAssignment: string; addEventListener(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -22798,6 +22825,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -22980,6 +23013,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -23043,6 +23082,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -28631,6 +28681,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -30932,6 +30984,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream>; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: AsyncIterable | Iterable): ReadableStream; }; /** @@ -37921,6 +37979,8 @@ declare var TransformStreamDefaultController: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransitionEvent) */ interface TransitionEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransitionEvent/animation) */ + readonly animation: CSSTransition | null; /** * The **`TransitionEvent.elapsedTime`** read-only property is a float giving the amount of time the animation has been running, in seconds, when this event fired. This value is not affected by the transition-delay property. * @@ -44079,6 +44139,7 @@ interface HTMLElementTagNameMap { "search": HTMLElement; "section": HTMLElement; "select": HTMLSelectElement; + "selectedcontent": HTMLSelectedContentElement; "slot": HTMLSlotElement; "small": HTMLElement; "source": HTMLSourceElement; diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index bf2af6371..b84336f87 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -660,6 +660,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -997,6 +1003,25 @@ interface ResponseInit { statusText?: string; } +interface RouterCondition { + not?: RouterCondition; + or?: RouterCondition[]; + requestDestination?: RequestDestination; + requestMethod?: string; + requestMode?: RequestMode; + runningStatus?: RunningStatus; + urlPattern?: URLPatternCompatible; +} + +interface RouterRule { + condition: RouterCondition; + source: RouterSource; +} + +interface RouterSourceDict { + cacheName?: string; +} + interface RsaHashedImportParams extends Algorithm { hash: HashAlgorithmIdentifier; } @@ -6165,6 +6190,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -6347,6 +6378,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -6410,6 +6447,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -6661,6 +6709,25 @@ interface ImportMeta { resolve(specifier: string): string; } +/** + * The parameter passed into an install event handler function, the **`InstallEvent`** interface represents an install action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent, it ensures that functional events such as FetchEvent are not dispatched during installation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent) + */ +interface InstallEvent extends ExtendableEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | RouterRule[]): Promise; +} + +declare var InstallEvent: { + prototype: InstallEvent; + new(type: string, eventInitDict?: ExtendableEventInit): InstallEvent; +}; + /** * The **`KHR_parallel_shader_compile`** extension is part of the WebGL API and enables a non-blocking poll operation, so that compile/link status availability (COMPLETION_STATUS_KHR) can be queried without potentially incurring stalls. In other words you can check the status of your shaders compiling without blocking the runtime. * @@ -7757,6 +7824,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -8213,6 +8282,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream>; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: AsyncIterable | Iterable): ReadableStream; }; /** @@ -13616,9 +13691,11 @@ type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableSt type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; type ReportList = Report[]; type RequestInfo = Request | string; +type RouterSource = RouterSourceDict | RouterSourceEnum; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer; +type URLPatternCompatible = string | URLPatternInit | URLPattern; type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; @@ -13716,6 +13793,8 @@ type RequestPriority = "auto" | "high" | "low"; type RequestRedirect = "error" | "follow" | "manual"; type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; +type RouterSourceEnum = "cache" | "fetch-event" | "network" | "race-network-and-fetch-handler"; +type RunningStatus = "not-running" | "running"; type SecurityPolicyViolationEventDisposition = "enforce" | "report"; type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant"; type ServiceWorkerUpdateViaCache = "all" | "imports" | "none"; @@ -13910,6 +13989,15 @@ interface IDBObjectStore { createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; } +interface InstallEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | Iterable): Promise; +} + interface MessageEvent { /** @deprecated */ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index 0aa57c3f9..b46ced139 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -604,6 +604,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -5848,6 +5854,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -6030,6 +6042,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -6093,6 +6111,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -7415,6 +7444,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -7796,6 +7827,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream>; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: AsyncIterable | Iterable): ReadableStream; }; /** diff --git a/baselines/ts5.5/audioworklet.generated.d.ts b/baselines/ts5.5/audioworklet.generated.d.ts index b60857baa..9286008c9 100644 --- a/baselines/ts5.5/audioworklet.generated.d.ts +++ b/baselines/ts5.5/audioworklet.generated.d.ts @@ -959,6 +959,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index 3933fe9bb..81030f963 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -1270,6 +1270,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -4065,6 +4071,8 @@ declare var AnimationEffect: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEvent) */ interface AnimationEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEvent/animation) */ + readonly animation: CSSAnimation | null; /** * The **`AnimationEvent.animationName`** read-only property is a string containing the value of the animation-name CSS property associated with the transition. * @@ -21099,6 +21107,23 @@ declare var HTMLSelectElement: { new(): HTMLSelectElement; }; +/** + * The **`HTMLSelectedContentElement`** interface represents a element in the DOM. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectedContentElement) + */ +interface HTMLSelectedContentElement extends HTMLElement { + addEventListener(type: K, listener: (this: HTMLSelectedContentElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLSelectedContentElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var HTMLSelectedContentElement: { + prototype: HTMLSelectedContentElement; + new(): HTMLSelectedContentElement; +}; + /** * The **`HTMLSlotElement`** interface of the Shadow DOM API enables access to the name and assigned nodes of an HTML element. * @@ -21803,6 +21828,8 @@ interface HTMLTemplateElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootSerializable) */ shadowRootSerializable: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootSlotAssignment) */ + shadowRootSlotAssignment: string; addEventListener(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -22774,6 +22801,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -22956,6 +22989,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -23019,6 +23058,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -28607,6 +28657,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -30908,6 +30960,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** @@ -37895,6 +37953,8 @@ declare var TransformStreamDefaultController: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransitionEvent) */ interface TransitionEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransitionEvent/animation) */ + readonly animation: CSSTransition | null; /** * The **`TransitionEvent.elapsedTime`** read-only property is a float giving the amount of time the animation has been running, in seconds, when this event fired. This value is not affected by the transition-delay property. * @@ -44053,6 +44113,7 @@ interface HTMLElementTagNameMap { "search": HTMLElement; "section": HTMLElement; "select": HTMLSelectElement; + "selectedcontent": HTMLSelectedContentElement; "slot": HTMLSlotElement; "small": HTMLElement; "source": HTMLSourceElement; diff --git a/baselines/ts5.5/serviceworker.generated.d.ts b/baselines/ts5.5/serviceworker.generated.d.ts index fe5c41d15..f1f98c978 100644 --- a/baselines/ts5.5/serviceworker.generated.d.ts +++ b/baselines/ts5.5/serviceworker.generated.d.ts @@ -657,6 +657,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -994,6 +1000,25 @@ interface ResponseInit { statusText?: string; } +interface RouterCondition { + not?: RouterCondition; + or?: RouterCondition[]; + requestDestination?: RequestDestination; + requestMethod?: string; + requestMode?: RequestMode; + runningStatus?: RunningStatus; + urlPattern?: URLPatternCompatible; +} + +interface RouterRule { + condition: RouterCondition; + source: RouterSource; +} + +interface RouterSourceDict { + cacheName?: string; +} + interface RsaHashedImportParams extends Algorithm { hash: HashAlgorithmIdentifier; } @@ -6162,6 +6187,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -6344,6 +6375,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -6407,6 +6444,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -6658,6 +6706,25 @@ interface ImportMeta { resolve(specifier: string): string; } +/** + * The parameter passed into an install event handler function, the **`InstallEvent`** interface represents an install action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent, it ensures that functional events such as FetchEvent are not dispatched during installation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent) + */ +interface InstallEvent extends ExtendableEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | RouterRule[]): Promise; +} + +declare var InstallEvent: { + prototype: InstallEvent; + new(type: string, eventInitDict?: ExtendableEventInit): InstallEvent; +}; + /** * The **`KHR_parallel_shader_compile`** extension is part of the WebGL API and enables a non-blocking poll operation, so that compile/link status availability (COMPLETION_STATUS_KHR) can be queried without potentially incurring stalls. In other words you can check the status of your shaders compiling without blocking the runtime. * @@ -7754,6 +7821,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -8210,6 +8279,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** @@ -13613,9 +13688,11 @@ type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableSt type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; type ReportList = Report[]; type RequestInfo = Request | string; +type RouterSource = RouterSourceDict | RouterSourceEnum; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer; +type URLPatternCompatible = string | URLPatternInit | URLPattern; type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; @@ -13713,6 +13790,8 @@ type RequestPriority = "auto" | "high" | "low"; type RequestRedirect = "error" | "follow" | "manual"; type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; +type RouterSourceEnum = "cache" | "fetch-event" | "network" | "race-network-and-fetch-handler"; +type RunningStatus = "not-running" | "running"; type SecurityPolicyViolationEventDisposition = "enforce" | "report"; type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant"; type ServiceWorkerUpdateViaCache = "all" | "imports" | "none"; diff --git a/baselines/ts5.5/serviceworker.iterable.generated.d.ts b/baselines/ts5.5/serviceworker.iterable.generated.d.ts index 926cc2790..7bb89a1fb 100644 --- a/baselines/ts5.5/serviceworker.iterable.generated.d.ts +++ b/baselines/ts5.5/serviceworker.iterable.generated.d.ts @@ -171,6 +171,15 @@ interface IDBObjectStore { createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; } +interface InstallEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | Iterable): Promise; +} + interface MessageEvent { /** @deprecated */ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; diff --git a/baselines/ts5.5/sharedworker.generated.d.ts b/baselines/ts5.5/sharedworker.generated.d.ts index 812fb3da4..0066e37a4 100644 --- a/baselines/ts5.5/sharedworker.generated.d.ts +++ b/baselines/ts5.5/sharedworker.generated.d.ts @@ -601,6 +601,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -5845,6 +5851,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -6027,6 +6039,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -6090,6 +6108,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -7412,6 +7441,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -7793,6 +7824,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** diff --git a/baselines/ts5.5/webworker.generated.d.ts b/baselines/ts5.5/webworker.generated.d.ts index 4379bc659..ebe0835fe 100644 --- a/baselines/ts5.5/webworker.generated.d.ts +++ b/baselines/ts5.5/webworker.generated.d.ts @@ -748,6 +748,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -1145,6 +1151,25 @@ interface ResponseInit { statusText?: string; } +interface RouterCondition { + not?: RouterCondition; + or?: RouterCondition[]; + requestDestination?: RequestDestination; + requestMethod?: string; + requestMode?: RequestMode; + runningStatus?: RunningStatus; + urlPattern?: URLPatternCompatible; +} + +interface RouterRule { + condition: RouterCondition; + source: RouterSource; +} + +interface RouterSourceDict { + cacheName?: string; +} + interface RsaHashedImportParams extends Algorithm { hash: HashAlgorithmIdentifier; } @@ -6893,6 +6918,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -7075,6 +7106,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -7138,6 +7175,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -7528,6 +7576,25 @@ interface ImportMeta { resolve(specifier: string): string; } +/** + * The parameter passed into an install event handler function, the **`InstallEvent`** interface represents an install action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent, it ensures that functional events such as FetchEvent are not dispatched during installation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent) + */ +interface InstallEvent extends ExtendableEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | RouterRule[]): Promise; +} + +declare var InstallEvent: { + prototype: InstallEvent; + new(type: string, eventInitDict?: ExtendableEventInit): InstallEvent; +}; + /** * The **`KHR_parallel_shader_compile`** extension is part of the WebGL API and enables a non-blocking poll operation, so that compile/link status availability (COMPLETION_STATUS_KHR) can be queried without potentially incurring stalls. In other words you can check the status of your shaders compiling without blocking the runtime. * @@ -8656,6 +8723,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -9361,6 +9430,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** @@ -15428,9 +15503,11 @@ type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableSt type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; type ReportList = Report[]; type RequestInfo = Request | string; +type RouterSource = RouterSourceDict | RouterSourceEnum; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas | VideoFrame; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer; +type URLPatternCompatible = string | URLPatternInit | URLPattern; type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; @@ -15542,6 +15619,8 @@ type RequestPriority = "auto" | "high" | "low"; type RequestRedirect = "error" | "follow" | "manual"; type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; +type RouterSourceEnum = "cache" | "fetch-event" | "network" | "race-network-and-fetch-handler"; +type RunningStatus = "not-running" | "running"; type SecurityPolicyViolationEventDisposition = "enforce" | "report"; type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant"; type ServiceWorkerUpdateViaCache = "all" | "imports" | "none"; diff --git a/baselines/ts5.5/webworker.iterable.generated.d.ts b/baselines/ts5.5/webworker.iterable.generated.d.ts index 606e6c3cd..bb471a7be 100644 --- a/baselines/ts5.5/webworker.iterable.generated.d.ts +++ b/baselines/ts5.5/webworker.iterable.generated.d.ts @@ -175,6 +175,15 @@ interface ImageTrackList { [Symbol.iterator](): IterableIterator; } +interface InstallEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | Iterable): Promise; +} + interface MessageEvent { /** @deprecated */ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; diff --git a/baselines/ts5.6/audioworklet.generated.d.ts b/baselines/ts5.6/audioworklet.generated.d.ts index b60857baa..9286008c9 100644 --- a/baselines/ts5.6/audioworklet.generated.d.ts +++ b/baselines/ts5.6/audioworklet.generated.d.ts @@ -959,6 +959,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index 32adce71e..3a562abdf 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -1270,6 +1270,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -4065,6 +4071,8 @@ declare var AnimationEffect: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEvent) */ interface AnimationEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEvent/animation) */ + readonly animation: CSSAnimation | null; /** * The **`AnimationEvent.animationName`** read-only property is a string containing the value of the animation-name CSS property associated with the transition. * @@ -21119,6 +21127,23 @@ declare var HTMLSelectElement: { new(): HTMLSelectElement; }; +/** + * The **`HTMLSelectedContentElement`** interface represents a element in the DOM. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectedContentElement) + */ +interface HTMLSelectedContentElement extends HTMLElement { + addEventListener(type: K, listener: (this: HTMLSelectedContentElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLSelectedContentElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var HTMLSelectedContentElement: { + prototype: HTMLSelectedContentElement; + new(): HTMLSelectedContentElement; +}; + /** * The **`HTMLSlotElement`** interface of the Shadow DOM API enables access to the name and assigned nodes of an HTML element. * @@ -21824,6 +21849,8 @@ interface HTMLTemplateElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootSerializable) */ shadowRootSerializable: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootSlotAssignment) */ + shadowRootSlotAssignment: string; addEventListener(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -22795,6 +22822,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -22977,6 +23010,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -23040,6 +23079,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -28628,6 +28678,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -30929,6 +30981,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** @@ -37918,6 +37976,8 @@ declare var TransformStreamDefaultController: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransitionEvent) */ interface TransitionEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransitionEvent/animation) */ + readonly animation: CSSTransition | null; /** * The **`TransitionEvent.elapsedTime`** read-only property is a float giving the amount of time the animation has been running, in seconds, when this event fired. This value is not affected by the transition-delay property. * @@ -44076,6 +44136,7 @@ interface HTMLElementTagNameMap { "search": HTMLElement; "section": HTMLElement; "select": HTMLSelectElement; + "selectedcontent": HTMLSelectedContentElement; "slot": HTMLSlotElement; "small": HTMLElement; "source": HTMLSourceElement; diff --git a/baselines/ts5.6/serviceworker.generated.d.ts b/baselines/ts5.6/serviceworker.generated.d.ts index fe5c41d15..f1f98c978 100644 --- a/baselines/ts5.6/serviceworker.generated.d.ts +++ b/baselines/ts5.6/serviceworker.generated.d.ts @@ -657,6 +657,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -994,6 +1000,25 @@ interface ResponseInit { statusText?: string; } +interface RouterCondition { + not?: RouterCondition; + or?: RouterCondition[]; + requestDestination?: RequestDestination; + requestMethod?: string; + requestMode?: RequestMode; + runningStatus?: RunningStatus; + urlPattern?: URLPatternCompatible; +} + +interface RouterRule { + condition: RouterCondition; + source: RouterSource; +} + +interface RouterSourceDict { + cacheName?: string; +} + interface RsaHashedImportParams extends Algorithm { hash: HashAlgorithmIdentifier; } @@ -6162,6 +6187,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -6344,6 +6375,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -6407,6 +6444,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -6658,6 +6706,25 @@ interface ImportMeta { resolve(specifier: string): string; } +/** + * The parameter passed into an install event handler function, the **`InstallEvent`** interface represents an install action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent, it ensures that functional events such as FetchEvent are not dispatched during installation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent) + */ +interface InstallEvent extends ExtendableEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | RouterRule[]): Promise; +} + +declare var InstallEvent: { + prototype: InstallEvent; + new(type: string, eventInitDict?: ExtendableEventInit): InstallEvent; +}; + /** * The **`KHR_parallel_shader_compile`** extension is part of the WebGL API and enables a non-blocking poll operation, so that compile/link status availability (COMPLETION_STATUS_KHR) can be queried without potentially incurring stalls. In other words you can check the status of your shaders compiling without blocking the runtime. * @@ -7754,6 +7821,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -8210,6 +8279,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** @@ -13613,9 +13688,11 @@ type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableSt type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; type ReportList = Report[]; type RequestInfo = Request | string; +type RouterSource = RouterSourceDict | RouterSourceEnum; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer; +type URLPatternCompatible = string | URLPatternInit | URLPattern; type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; @@ -13713,6 +13790,8 @@ type RequestPriority = "auto" | "high" | "low"; type RequestRedirect = "error" | "follow" | "manual"; type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; +type RouterSourceEnum = "cache" | "fetch-event" | "network" | "race-network-and-fetch-handler"; +type RunningStatus = "not-running" | "running"; type SecurityPolicyViolationEventDisposition = "enforce" | "report"; type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant"; type ServiceWorkerUpdateViaCache = "all" | "imports" | "none"; diff --git a/baselines/ts5.6/serviceworker.iterable.generated.d.ts b/baselines/ts5.6/serviceworker.iterable.generated.d.ts index f7b7aaf20..7fb311ec9 100644 --- a/baselines/ts5.6/serviceworker.iterable.generated.d.ts +++ b/baselines/ts5.6/serviceworker.iterable.generated.d.ts @@ -179,6 +179,15 @@ interface IDBObjectStore { createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; } +interface InstallEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | Iterable): Promise; +} + interface MessageEvent { /** @deprecated */ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; diff --git a/baselines/ts5.6/sharedworker.generated.d.ts b/baselines/ts5.6/sharedworker.generated.d.ts index 812fb3da4..0066e37a4 100644 --- a/baselines/ts5.6/sharedworker.generated.d.ts +++ b/baselines/ts5.6/sharedworker.generated.d.ts @@ -601,6 +601,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -5845,6 +5851,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -6027,6 +6039,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -6090,6 +6108,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -7412,6 +7441,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -7793,6 +7824,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** diff --git a/baselines/ts5.6/webworker.generated.d.ts b/baselines/ts5.6/webworker.generated.d.ts index 4379bc659..ebe0835fe 100644 --- a/baselines/ts5.6/webworker.generated.d.ts +++ b/baselines/ts5.6/webworker.generated.d.ts @@ -748,6 +748,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -1145,6 +1151,25 @@ interface ResponseInit { statusText?: string; } +interface RouterCondition { + not?: RouterCondition; + or?: RouterCondition[]; + requestDestination?: RequestDestination; + requestMethod?: string; + requestMode?: RequestMode; + runningStatus?: RunningStatus; + urlPattern?: URLPatternCompatible; +} + +interface RouterRule { + condition: RouterCondition; + source: RouterSource; +} + +interface RouterSourceDict { + cacheName?: string; +} + interface RsaHashedImportParams extends Algorithm { hash: HashAlgorithmIdentifier; } @@ -6893,6 +6918,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -7075,6 +7106,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -7138,6 +7175,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -7528,6 +7576,25 @@ interface ImportMeta { resolve(specifier: string): string; } +/** + * The parameter passed into an install event handler function, the **`InstallEvent`** interface represents an install action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent, it ensures that functional events such as FetchEvent are not dispatched during installation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent) + */ +interface InstallEvent extends ExtendableEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | RouterRule[]): Promise; +} + +declare var InstallEvent: { + prototype: InstallEvent; + new(type: string, eventInitDict?: ExtendableEventInit): InstallEvent; +}; + /** * The **`KHR_parallel_shader_compile`** extension is part of the WebGL API and enables a non-blocking poll operation, so that compile/link status availability (COMPLETION_STATUS_KHR) can be queried without potentially incurring stalls. In other words you can check the status of your shaders compiling without blocking the runtime. * @@ -8656,6 +8723,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -9361,6 +9430,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** @@ -15428,9 +15503,11 @@ type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableSt type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; type ReportList = Report[]; type RequestInfo = Request | string; +type RouterSource = RouterSourceDict | RouterSourceEnum; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas | VideoFrame; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer; +type URLPatternCompatible = string | URLPatternInit | URLPattern; type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; @@ -15542,6 +15619,8 @@ type RequestPriority = "auto" | "high" | "low"; type RequestRedirect = "error" | "follow" | "manual"; type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; +type RouterSourceEnum = "cache" | "fetch-event" | "network" | "race-network-and-fetch-handler"; +type RunningStatus = "not-running" | "running"; type SecurityPolicyViolationEventDisposition = "enforce" | "report"; type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant"; type ServiceWorkerUpdateViaCache = "all" | "imports" | "none"; diff --git a/baselines/ts5.6/webworker.iterable.generated.d.ts b/baselines/ts5.6/webworker.iterable.generated.d.ts index 049c52aeb..6c8d5b104 100644 --- a/baselines/ts5.6/webworker.iterable.generated.d.ts +++ b/baselines/ts5.6/webworker.iterable.generated.d.ts @@ -183,6 +183,15 @@ interface ImageTrackList { [Symbol.iterator](): ArrayIterator; } +interface InstallEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | Iterable): Promise; +} + interface MessageEvent { /** @deprecated */ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; diff --git a/baselines/ts5.9/audioworklet.generated.d.ts b/baselines/ts5.9/audioworklet.generated.d.ts index 047d68b93..5627b21de 100644 --- a/baselines/ts5.9/audioworklet.generated.d.ts +++ b/baselines/ts5.9/audioworklet.generated.d.ts @@ -959,6 +959,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream>; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** diff --git a/baselines/ts5.9/dom.generated.d.ts b/baselines/ts5.9/dom.generated.d.ts index 84c0dd8a6..df948e49d 100644 --- a/baselines/ts5.9/dom.generated.d.ts +++ b/baselines/ts5.9/dom.generated.d.ts @@ -1270,6 +1270,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -4065,6 +4071,8 @@ declare var AnimationEffect: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEvent) */ interface AnimationEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEvent/animation) */ + readonly animation: CSSAnimation | null; /** * The **`AnimationEvent.animationName`** read-only property is a string containing the value of the animation-name CSS property associated with the transition. * @@ -21119,6 +21127,23 @@ declare var HTMLSelectElement: { new(): HTMLSelectElement; }; +/** + * The **`HTMLSelectedContentElement`** interface represents a element in the DOM. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectedContentElement) + */ +interface HTMLSelectedContentElement extends HTMLElement { + addEventListener(type: K, listener: (this: HTMLSelectedContentElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLSelectedContentElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var HTMLSelectedContentElement: { + prototype: HTMLSelectedContentElement; + new(): HTMLSelectedContentElement; +}; + /** * The **`HTMLSlotElement`** interface of the Shadow DOM API enables access to the name and assigned nodes of an HTML element. * @@ -21824,6 +21849,8 @@ interface HTMLTemplateElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootSerializable) */ shadowRootSerializable: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootSlotAssignment) */ + shadowRootSlotAssignment: string; addEventListener(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -22795,6 +22822,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -22977,6 +23010,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -23040,6 +23079,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -28628,6 +28678,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -30929,6 +30981,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream>; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** @@ -37918,6 +37976,8 @@ declare var TransformStreamDefaultController: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransitionEvent) */ interface TransitionEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransitionEvent/animation) */ + readonly animation: CSSTransition | null; /** * The **`TransitionEvent.elapsedTime`** read-only property is a float giving the amount of time the animation has been running, in seconds, when this event fired. This value is not affected by the transition-delay property. * @@ -44076,6 +44136,7 @@ interface HTMLElementTagNameMap { "search": HTMLElement; "section": HTMLElement; "select": HTMLSelectElement; + "selectedcontent": HTMLSelectedContentElement; "slot": HTMLSlotElement; "small": HTMLElement; "source": HTMLSourceElement; diff --git a/baselines/ts5.9/serviceworker.generated.d.ts b/baselines/ts5.9/serviceworker.generated.d.ts index 01e6d5359..6b04e1123 100644 --- a/baselines/ts5.9/serviceworker.generated.d.ts +++ b/baselines/ts5.9/serviceworker.generated.d.ts @@ -657,6 +657,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -994,6 +1000,25 @@ interface ResponseInit { statusText?: string; } +interface RouterCondition { + not?: RouterCondition; + or?: RouterCondition[]; + requestDestination?: RequestDestination; + requestMethod?: string; + requestMode?: RequestMode; + runningStatus?: RunningStatus; + urlPattern?: URLPatternCompatible; +} + +interface RouterRule { + condition: RouterCondition; + source: RouterSource; +} + +interface RouterSourceDict { + cacheName?: string; +} + interface RsaHashedImportParams extends Algorithm { hash: HashAlgorithmIdentifier; } @@ -6162,6 +6187,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -6344,6 +6375,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -6407,6 +6444,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -6658,6 +6706,25 @@ interface ImportMeta { resolve(specifier: string): string; } +/** + * The parameter passed into an install event handler function, the **`InstallEvent`** interface represents an install action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent, it ensures that functional events such as FetchEvent are not dispatched during installation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent) + */ +interface InstallEvent extends ExtendableEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | RouterRule[]): Promise; +} + +declare var InstallEvent: { + prototype: InstallEvent; + new(type: string, eventInitDict?: ExtendableEventInit): InstallEvent; +}; + /** * The **`KHR_parallel_shader_compile`** extension is part of the WebGL API and enables a non-blocking poll operation, so that compile/link status availability (COMPLETION_STATUS_KHR) can be queried without potentially incurring stalls. In other words you can check the status of your shaders compiling without blocking the runtime. * @@ -7754,6 +7821,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -8210,6 +8279,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream>; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** @@ -13613,9 +13688,11 @@ type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableSt type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; type ReportList = Report[]; type RequestInfo = Request | string; +type RouterSource = RouterSourceDict | RouterSourceEnum; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer; +type URLPatternCompatible = string | URLPatternInit | URLPattern; type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; @@ -13713,6 +13790,8 @@ type RequestPriority = "auto" | "high" | "low"; type RequestRedirect = "error" | "follow" | "manual"; type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; +type RouterSourceEnum = "cache" | "fetch-event" | "network" | "race-network-and-fetch-handler"; +type RunningStatus = "not-running" | "running"; type SecurityPolicyViolationEventDisposition = "enforce" | "report"; type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant"; type ServiceWorkerUpdateViaCache = "all" | "imports" | "none"; diff --git a/baselines/ts5.9/serviceworker.iterable.generated.d.ts b/baselines/ts5.9/serviceworker.iterable.generated.d.ts index 55e099512..bdadc5b12 100644 --- a/baselines/ts5.9/serviceworker.iterable.generated.d.ts +++ b/baselines/ts5.9/serviceworker.iterable.generated.d.ts @@ -179,6 +179,15 @@ interface IDBObjectStore { createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; } +interface InstallEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | Iterable): Promise; +} + interface MessageEvent { /** @deprecated */ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; diff --git a/baselines/ts5.9/sharedworker.generated.d.ts b/baselines/ts5.9/sharedworker.generated.d.ts index 3feb5ab32..f2d79dcbd 100644 --- a/baselines/ts5.9/sharedworker.generated.d.ts +++ b/baselines/ts5.9/sharedworker.generated.d.ts @@ -601,6 +601,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -5845,6 +5851,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -6027,6 +6039,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -6090,6 +6108,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -7412,6 +7441,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -7793,6 +7824,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream>; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** diff --git a/baselines/ts5.9/webworker.generated.d.ts b/baselines/ts5.9/webworker.generated.d.ts index ad8845d32..71438720f 100644 --- a/baselines/ts5.9/webworker.generated.d.ts +++ b/baselines/ts5.9/webworker.generated.d.ts @@ -748,6 +748,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -1145,6 +1151,25 @@ interface ResponseInit { statusText?: string; } +interface RouterCondition { + not?: RouterCondition; + or?: RouterCondition[]; + requestDestination?: RequestDestination; + requestMethod?: string; + requestMode?: RequestMode; + runningStatus?: RunningStatus; + urlPattern?: URLPatternCompatible; +} + +interface RouterRule { + condition: RouterCondition; + source: RouterSource; +} + +interface RouterSourceDict { + cacheName?: string; +} + interface RsaHashedImportParams extends Algorithm { hash: HashAlgorithmIdentifier; } @@ -6893,6 +6918,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -7075,6 +7106,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -7138,6 +7175,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -7528,6 +7576,25 @@ interface ImportMeta { resolve(specifier: string): string; } +/** + * The parameter passed into an install event handler function, the **`InstallEvent`** interface represents an install action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent, it ensures that functional events such as FetchEvent are not dispatched during installation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent) + */ +interface InstallEvent extends ExtendableEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | RouterRule[]): Promise; +} + +declare var InstallEvent: { + prototype: InstallEvent; + new(type: string, eventInitDict?: ExtendableEventInit): InstallEvent; +}; + /** * The **`KHR_parallel_shader_compile`** extension is part of the WebGL API and enables a non-blocking poll operation, so that compile/link status availability (COMPLETION_STATUS_KHR) can be queried without potentially incurring stalls. In other words you can check the status of your shaders compiling without blocking the runtime. * @@ -8656,6 +8723,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -9361,6 +9430,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream>; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: Iterable): ReadableStream; }; /** @@ -15428,9 +15503,11 @@ type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableSt type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; type ReportList = Report[]; type RequestInfo = Request | string; +type RouterSource = RouterSourceDict | RouterSourceEnum; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas | VideoFrame; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer; +type URLPatternCompatible = string | URLPatternInit | URLPattern; type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; @@ -15542,6 +15619,8 @@ type RequestPriority = "auto" | "high" | "low"; type RequestRedirect = "error" | "follow" | "manual"; type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; +type RouterSourceEnum = "cache" | "fetch-event" | "network" | "race-network-and-fetch-handler"; +type RunningStatus = "not-running" | "running"; type SecurityPolicyViolationEventDisposition = "enforce" | "report"; type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant"; type ServiceWorkerUpdateViaCache = "all" | "imports" | "none"; diff --git a/baselines/ts5.9/webworker.iterable.generated.d.ts b/baselines/ts5.9/webworker.iterable.generated.d.ts index 4507a3906..4d43a98f1 100644 --- a/baselines/ts5.9/webworker.iterable.generated.d.ts +++ b/baselines/ts5.9/webworker.iterable.generated.d.ts @@ -183,6 +183,15 @@ interface ImageTrackList { [Symbol.iterator](): ArrayIterator; } +interface InstallEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | Iterable): Promise; +} + interface MessageEvent { /** @deprecated */ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index d83899699..193cbb748 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -751,6 +751,12 @@ interface IDBDatabaseInfo { version?: number; } +interface IDBGetAllOptions { + count?: number; + direction?: IDBCursorDirection; + query?: any; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -1148,6 +1154,25 @@ interface ResponseInit { statusText?: string; } +interface RouterCondition { + not?: RouterCondition; + or?: RouterCondition[]; + requestDestination?: RequestDestination; + requestMethod?: string; + requestMode?: RequestMode; + runningStatus?: RunningStatus; + urlPattern?: URLPatternCompatible; +} + +interface RouterRule { + condition: RouterCondition; + source: RouterSource; +} + +interface RouterSourceDict { + cacheName?: string; +} + interface RsaHashedImportParams extends Algorithm { hash: HashAlgorithmIdentifier; } @@ -6896,6 +6921,12 @@ interface IDBIndex { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBIndex interface retrieves all records (including index keys, primary keys, and values) from the index. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange. * @@ -7078,6 +7109,12 @@ interface IDBObjectStore { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(queryOrOptions?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; + /** + * The **`getAllRecords()`** method of the IDBObjectStore interface retrieves all records (including primary keys and values) from the object store. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllRecords) + */ + getAllRecords(options?: IDBGetAllOptions): IDBRequest; /** * The **`getKey()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store. * @@ -7141,6 +7178,17 @@ declare var IDBOpenDBRequest: { new(): IDBOpenDBRequest; }; +interface IDBRecord { + readonly key: any; + readonly primaryKey: any; + readonly value: any; +} + +declare var IDBRecord: { + prototype: IDBRecord; + new(): IDBRecord; +}; + interface IDBRequestEventMap { "error": Event; "success": Event; @@ -7531,6 +7579,25 @@ interface ImportMeta { resolve(specifier: string): string; } +/** + * The parameter passed into an install event handler function, the **`InstallEvent`** interface represents an install action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent, it ensures that functional events such as FetchEvent are not dispatched during installation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent) + */ +interface InstallEvent extends ExtendableEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | RouterRule[]): Promise; +} + +declare var InstallEvent: { + prototype: InstallEvent; + new(type: string, eventInitDict?: ExtendableEventInit): InstallEvent; +}; + /** * The **`KHR_parallel_shader_compile`** extension is part of the WebGL API and enables a non-blocking poll operation, so that compile/link status availability (COMPLETION_STATUS_KHR) can be queried without potentially incurring stalls. In other words you can check the status of your shaders compiling without blocking the runtime. * @@ -8659,6 +8726,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; + readonly workerCacheLookupStart: DOMHighResTimeStamp; + readonly workerRouterEvaluationStart: DOMHighResTimeStamp; /** * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0. * @@ -9364,6 +9433,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream>; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: AsyncIterable | Iterable): ReadableStream; }; /** @@ -15431,9 +15506,11 @@ type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableSt type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; type ReportList = Report[]; type RequestInfo = Request | string; +type RouterSource = RouterSourceDict | RouterSourceEnum; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas | VideoFrame; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer; +type URLPatternCompatible = string | URLPatternInit | URLPattern; type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; @@ -15545,6 +15622,8 @@ type RequestPriority = "auto" | "high" | "low"; type RequestRedirect = "error" | "follow" | "manual"; type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; +type RouterSourceEnum = "cache" | "fetch-event" | "network" | "race-network-and-fetch-handler"; +type RunningStatus = "not-running" | "running"; type SecurityPolicyViolationEventDisposition = "enforce" | "report"; type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant"; type ServiceWorkerUpdateViaCache = "all" | "imports" | "none"; @@ -15749,6 +15828,15 @@ interface ImageTrackList { [Symbol.iterator](): ArrayIterator; } +interface InstallEvent { + /** + * The **`addRoutes()`** method of the InstallEvent interface specifies one or more static routes, which define rules for fetching specified resources that will be used even before service worker startup. This allows you to, for example, bypass a service worker in cases where you always want to fetch a resource from the network or a browser Cache, and avoids the performance overhead of unnecessary service worker cycles. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InstallEvent/addRoutes) + */ + addRoutes(rules: RouterRule | Iterable): Promise; +} + interface MessageEvent { /** @deprecated */ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; diff --git a/package-lock.json b/package-lock.json index 23572c913..cb31f8256 100644 --- a/package-lock.json +++ b/package-lock.json @@ -316,9 +316,9 @@ } }, "node_modules/@mdn/browser-compat-data": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-8.0.4.tgz", - "integrity": "sha512-up6DsNsaPt3jq5d2TGx4UOXIqBKU0D86dxWwcVmmOOEYqP1rFaV1XcAcwHxMvb6bbtMfY5JpjUCszzy/aVc4yA==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-8.0.5.tgz", + "integrity": "sha512-gzTjryoDygkG3aK/xFAwut7QPBhmTy6RDUep5HqyqxEQlvNWmcoVTkmMeb0LQFhZnISu0nmPK767eKSjrjSXUQ==", "dev": true, "license": "CC0-1.0", "peer": true diff --git a/src/build.ts b/src/build.ts index 40a8304f0..166971680 100644 --- a/src/build.ts +++ b/src/build.ts @@ -252,7 +252,6 @@ async function emitDom() { allowUnrelatedSetterType: true, useGenericTypedArrays: true, includeIterable: true, - treatAsyncSequence: true, }, }, // ts5.7 (and later) @@ -263,7 +262,6 @@ async function emitDom() { useIteratorObject: true, allowUnrelatedSetterType: true, useGenericTypedArrays: true, - treatAsyncSequence: true, }, }, // ts5.6 diff --git a/src/build/emitter.ts b/src/build/emitter.ts index 31e43749f..cc48ab405 100644 --- a/src/build/emitter.ts +++ b/src/build/emitter.ts @@ -132,8 +132,6 @@ export interface CompilerBehavior { allowUnrelatedSetterType?: boolean; useGenericTypedArrays?: boolean; includeIterable?: boolean; - /** If true, treat async_sequence as AsyncIterable, otherwise as any (legacy < TS 4.4 emit). */ - treatAsyncSequence?: boolean; } export function emitWebIdl( @@ -406,24 +404,19 @@ export function emitWebIdl( obj: Browser.Typed, forReturn: boolean, ): string { - function convertBaseType() { - // Support async_sequence (see https://github.com/whatwg/streams/pull/1372) + function convertBaseType(): string[] { if (obj.type === "async_sequence") { - // AsyncIterable requires separate asynciterable.d.ts until TS 6.0. - // To make it correct, we need to defer any functions using async_sequence to the asynciterable variant. - // For now, skip generation and warn. - console.warn( - "Skipping generation for a function or property with async_sequence type: " + - JSON.stringify(obj), - ); - return "never"; // Use 'never' to signal omission in type generation + if (compilerBehavior.includeIterable) { + return ["AsyncIterable", "Iterable"]; + } + return ["Iterable"]; } if (obj.type === "sequence" && !forReturn && iterator !== "") { - return "Iterable"; + return ["Iterable"]; } if (!obj.additionalTypes && typeof obj.type === "string") { - return convertDomTypeToTsTypeSimple(obj.type); + return [convertDomTypeToTsTypeSimple(obj.type)]; } else { const types = typeof obj.type === "string" @@ -436,7 +429,7 @@ export function emitWebIdl( convertDomTypeToTsTypeWorker(t, forReturn), ); if (converted.includes("any")) { - return "any"; + return ["any"]; } // convert `ArrayBuffer | SharedArrayBuffer` into `ArrayBufferLike` to be pre-ES2017 friendly. @@ -450,26 +443,30 @@ export function emitWebIdl( converted.splice(maxIndex, 1); // drop whichever comes last } } - return converted.join(" | "); + return converted; + } + } + + function addSubtype(type: string) { + if ( + !subtypeString && + compilerBehavior.useGenericTypedArrays && + arrayBufferViewTypes.has(type) + ) { + subtypeString = obj.allowShared ? "ArrayBufferLike" : "ArrayBuffer"; } + + return type === "Array" && subtypeString + ? makeArrayType(subtypeString, obj) + : `${type}${subtypeString ? `<${subtypeString}>` : ""}`; } - const type = convertBaseType(); + const types = convertBaseType(); let subtypeString = arrayify(obj.subtype) .map((t) => convertDomTypeToTsTypeBase(t, forReturn)) .join(", "); - if ( - !subtypeString && - compilerBehavior.useGenericTypedArrays && - arrayBufferViewTypes.has(type) - ) { - subtypeString = obj.allowShared ? "ArrayBufferLike" : "ArrayBuffer"; - } - - return type === "Array" && subtypeString - ? makeArrayType(subtypeString, obj) - : `${type}${subtypeString ? `<${subtypeString}>` : ""}`; + return types.map(addSubtype).join(" | "); } function makeArrayType(elementType: string, obj: Browser.Typed): string { @@ -1797,6 +1794,20 @@ export function emitWebIdl( } } + function filterMethodsBySignature( + i: Browser.Interface, + predicate: (signature: Browser.Signature) => boolean | undefined, + ): Browser.Method[] { + return mapToArray(i.methods ? i.methods.method : {}) + .filter((m) => m.signature && !m.overrideSignatures && !m.static) + .map((m) => ({ + ...m, + signature: m.signature.filter(predicate), + })) + .filter((m) => m.signature.length) + .sort(compareName); + } + function emitIterator(i: Browser.Interface) { // https://webidl.spec.whatwg.org/#dfn-indexed-property-getter const isIndexedPropertyGetter = (m: Browser.AnonymousMethod) => @@ -1904,18 +1915,13 @@ export function emitWebIdl( ); const subtypes = getIteratorSubtypes(); - const methodsWithSequence: Browser.Method[] = mapToArray( - i.methods ? i.methods.method : {}, - ) - .filter((m) => m.signature && !m.overrideSignatures && !m.static) - .map((m) => ({ - ...m, - signature: replaceTypedefsInSignatures( - m.signature.filter(hasSequenceArgument), - ), - })) - .filter((m) => m.signature.length) - .sort(compareName); + const methodsWithSequence: Browser.Method[] = filterMethodsBySignature( + i, + hasSequenceArgument, + ).map((m) => ({ + ...m, + signature: replaceTypedefsInSignatures(m.signature), + })); if (!subtypes && !methodsWithSequence.length) { return; @@ -1958,8 +1964,26 @@ export function emitWebIdl( } } + function hasAsyncSequenceArgument(signature: Browser.Signature) { + function includesAsyncSequence(type: string | Browser.Typed[]): boolean { + if (Array.isArray(type)) { + return type.some((t) => includesAsyncSequence(t.type)); + } + return type === "async_sequence"; + } + return signature.param?.some( + (p) => !p.overrideType && includesAsyncSequence(p.type), + ); + } + const subtypes = getAsyncIteratorSubtypes(); - if (!subtypes) { + // Emit AsyncIterable separately for asynciterable.d.ts. + // But not when includeIterable=true as signatures should include AsyncIterable already. + const methodsWithAsyncSequence: Browser.Method[] = + !compilerBehavior.includeIterable + ? filterMethodsBySignature(i, hasAsyncSequenceArgument) + : []; + if (!subtypes && !methodsWithAsyncSequence.length) { return; } @@ -1969,13 +1993,19 @@ export function emitWebIdl( name, ); - emitSelfIterator(i); + if (subtypes) { + emitSelfIterator(i); + } printer.printLine(""); printer.printLine(`interface ${nameWithTypeParameters} {`); printer.increaseIndent(); - emitIterableMethods(i, name, subtypes); + methodsWithAsyncSequence.forEach((m) => emitMethod("", m, new Set())); + + if (subtypes) { + emitIterableMethods(i, name, subtypes); + } printer.decreaseIndent(); printer.printLine("}");