diff --git a/baselines/audioworklet.generated.d.ts b/baselines/audioworklet.generated.d.ts index f66a905a6..3f2caab45 100644 --- a/baselines/audioworklet.generated.d.ts +++ b/baselines/audioworklet.generated.d.ts @@ -1543,6 +1543,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -1603,7 +1634,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -1621,7 +1652,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -1662,25 +1693,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -1688,14 +1719,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -1711,9 +1760,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -1726,26 +1780,34 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 65f329b33..9b6c7a2bc 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -26762,6 +26762,7 @@ declare var Response: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement) */ interface SVGAElement extends SVGGraphicsElement, SVGURIReference { + download: string; /** * The **`rel`** property of the SVGAElement returns a string reflecting the value of the `rel` attribute of the SVG a element. * @@ -29142,6 +29143,7 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox { readonly SVG_MARKER_ORIENT_UNKNOWN: 0; readonly SVG_MARKER_ORIENT_AUTO: 1; readonly SVG_MARKER_ORIENT_ANGLE: 2; + readonly SVG_MARKER_ORIENT_AUTO_START_REVERSE: 3; addEventListener(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -29157,6 +29159,7 @@ declare var SVGMarkerElement: { readonly SVG_MARKER_ORIENT_UNKNOWN: 0; readonly SVG_MARKER_ORIENT_AUTO: 1; readonly SVG_MARKER_ORIENT_ANGLE: 2; + readonly SVG_MARKER_ORIENT_AUTO_START_REVERSE: 3; }; /** @@ -29801,7 +29804,7 @@ interface SVGSVGElement extends SVGGraphicsElement, SVGFitToViewBox, WindowEvent * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGSVGElement/getElementById) */ - getElementById(elementId: string): Element; + getElementById(elementId: string): Element | null; getEnclosureList(rect: DOMRectReadOnly, referenceElement: SVGElement | null): NodeListOf; getIntersectionList(rect: DOMRectReadOnly, referenceElement: SVGElement | null): NodeListOf; /** @@ -29976,6 +29979,11 @@ declare var SVGStringList: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGStyleElement) */ interface SVGStyleElement extends SVGElement, LinkStyle { + /** + * The **`SVGStyleElement.disabled`** property can be used to get and set whether the stylesheet is disabled (`true`) or not (`false`). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGStyleElement/disabled) + */ disabled: boolean; /** * The **`SVGStyleElement.media`** property is a media query string corresponding to the `media` attribute of the given SVG style element. @@ -31098,12 +31106,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -31299,10 +31301,15 @@ interface SourceBuffer extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/mode) */ mode: AppendMode; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/abort_event) */ onabort: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/error_event) */ onerror: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/update_event) */ onupdate: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/updateend_event) */ onupdateend: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/updatestart_event) */ onupdatestart: ((this: SourceBuffer, ev: Event) => any) | null; /** * The **`timestampOffset`** property of the SourceBuffer interface controls the offset applied to timestamps inside media segments that are appended to the `SourceBuffer`. @@ -38352,6 +38359,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -38412,7 +38450,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -38430,7 +38468,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -38471,25 +38509,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -38497,14 +38535,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -38520,9 +38576,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -38535,30 +38596,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index 17d8165f8..ce4f51f08 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -6244,6 +6244,12 @@ declare var PushManager: { readonly supportedContentEncodings: ReadonlyArray; }; +/** Available only in secure contexts. */ +interface PushManagerAttribute { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */ + readonly pushManager: PushManager; +} + /** * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats. * Available only in secure contexts. @@ -7113,7 +7119,7 @@ interface ServiceWorkerRegistrationEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration) */ -interface ServiceWorkerRegistration extends EventTarget { +interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute { /** * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`. * @@ -7140,12 +7146,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -11052,6 +11052,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -11112,7 +11143,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -11130,7 +11161,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -11171,25 +11202,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -11197,14 +11228,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -11220,9 +11269,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -11235,30 +11289,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index c21022879..33fe6eb4a 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -6636,12 +6636,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -10778,6 +10772,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -10838,7 +10863,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -10856,7 +10881,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -10897,25 +10922,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -10923,14 +10948,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -10946,9 +10989,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -10961,30 +11009,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.5/audioworklet.generated.d.ts b/baselines/ts5.5/audioworklet.generated.d.ts index 2b853ce56..faccc9343 100644 --- a/baselines/ts5.5/audioworklet.generated.d.ts +++ b/baselines/ts5.5/audioworklet.generated.d.ts @@ -1540,6 +1540,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -1600,7 +1631,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -1618,7 +1649,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -1659,25 +1690,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -1685,14 +1716,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -1708,9 +1757,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -1723,26 +1777,34 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index 60f0b03cf..1c9b1f90e 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -26738,6 +26738,7 @@ declare var Response: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement) */ interface SVGAElement extends SVGGraphicsElement, SVGURIReference { + download: string; /** * The **`rel`** property of the SVGAElement returns a string reflecting the value of the `rel` attribute of the SVG a element. * @@ -29117,6 +29118,7 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox { readonly SVG_MARKER_ORIENT_UNKNOWN: 0; readonly SVG_MARKER_ORIENT_AUTO: 1; readonly SVG_MARKER_ORIENT_ANGLE: 2; + readonly SVG_MARKER_ORIENT_AUTO_START_REVERSE: 3; addEventListener(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -29132,6 +29134,7 @@ declare var SVGMarkerElement: { readonly SVG_MARKER_ORIENT_UNKNOWN: 0; readonly SVG_MARKER_ORIENT_AUTO: 1; readonly SVG_MARKER_ORIENT_ANGLE: 2; + readonly SVG_MARKER_ORIENT_AUTO_START_REVERSE: 3; }; /** @@ -29776,7 +29779,7 @@ interface SVGSVGElement extends SVGGraphicsElement, SVGFitToViewBox, WindowEvent * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGSVGElement/getElementById) */ - getElementById(elementId: string): Element; + getElementById(elementId: string): Element | null; getEnclosureList(rect: DOMRectReadOnly, referenceElement: SVGElement | null): NodeListOf; getIntersectionList(rect: DOMRectReadOnly, referenceElement: SVGElement | null): NodeListOf; /** @@ -29951,6 +29954,11 @@ declare var SVGStringList: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGStyleElement) */ interface SVGStyleElement extends SVGElement, LinkStyle { + /** + * The **`SVGStyleElement.disabled`** property can be used to get and set whether the stylesheet is disabled (`true`) or not (`false`). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGStyleElement/disabled) + */ disabled: boolean; /** * The **`SVGStyleElement.media`** property is a media query string corresponding to the `media` attribute of the given SVG style element. @@ -31073,12 +31081,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -31274,10 +31276,15 @@ interface SourceBuffer extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/mode) */ mode: AppendMode; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/abort_event) */ onabort: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/error_event) */ onerror: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/update_event) */ onupdate: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/updateend_event) */ onupdateend: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/updatestart_event) */ onupdatestart: ((this: SourceBuffer, ev: Event) => any) | null; /** * The **`timestampOffset`** property of the SourceBuffer interface controls the offset applied to timestamps inside media segments that are appended to the `SourceBuffer`. @@ -38326,6 +38333,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -38386,7 +38424,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -38404,7 +38442,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -38445,25 +38483,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -38471,14 +38509,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -38494,9 +38550,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -38509,30 +38570,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.5/serviceworker.generated.d.ts b/baselines/ts5.5/serviceworker.generated.d.ts index d9e9d03da..3d1c96d29 100644 --- a/baselines/ts5.5/serviceworker.generated.d.ts +++ b/baselines/ts5.5/serviceworker.generated.d.ts @@ -6241,6 +6241,12 @@ declare var PushManager: { readonly supportedContentEncodings: ReadonlyArray; }; +/** Available only in secure contexts. */ +interface PushManagerAttribute { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */ + readonly pushManager: PushManager; +} + /** * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats. * Available only in secure contexts. @@ -7110,7 +7116,7 @@ interface ServiceWorkerRegistrationEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration) */ -interface ServiceWorkerRegistration extends EventTarget { +interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute { /** * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`. * @@ -7137,12 +7143,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -11049,6 +11049,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -11109,7 +11140,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -11127,7 +11158,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -11168,25 +11199,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -11194,14 +11225,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -11217,9 +11266,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -11232,30 +11286,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.5/sharedworker.generated.d.ts b/baselines/ts5.5/sharedworker.generated.d.ts index ffb0f7c46..9ecf08e31 100644 --- a/baselines/ts5.5/sharedworker.generated.d.ts +++ b/baselines/ts5.5/sharedworker.generated.d.ts @@ -6633,12 +6633,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -10775,6 +10769,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -10835,7 +10860,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -10853,7 +10878,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -10894,25 +10919,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -10920,14 +10945,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -10943,9 +10986,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -10958,30 +11006,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.5/webworker.generated.d.ts b/baselines/ts5.5/webworker.generated.d.ts index ce27127ff..bd5d652e3 100644 --- a/baselines/ts5.5/webworker.generated.d.ts +++ b/baselines/ts5.5/webworker.generated.d.ts @@ -7102,6 +7102,12 @@ declare var PushManager: { readonly supportedContentEncodings: ReadonlyArray; }; +/** Available only in secure contexts. */ +interface PushManagerAttribute { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */ + readonly pushManager: PushManager; +} + /** * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats. * Available only in secure contexts. @@ -8212,7 +8218,7 @@ interface ServiceWorkerRegistrationEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration) */ -interface ServiceWorkerRegistration extends EventTarget { +interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute { /** * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`. * @@ -8239,12 +8245,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -12703,6 +12703,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -12763,7 +12794,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -12781,7 +12812,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -12822,25 +12853,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -12848,14 +12879,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -12871,9 +12920,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -12886,30 +12940,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.6/audioworklet.generated.d.ts b/baselines/ts5.6/audioworklet.generated.d.ts index 2b853ce56..faccc9343 100644 --- a/baselines/ts5.6/audioworklet.generated.d.ts +++ b/baselines/ts5.6/audioworklet.generated.d.ts @@ -1540,6 +1540,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -1600,7 +1631,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -1618,7 +1649,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -1659,25 +1690,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -1685,14 +1716,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -1708,9 +1757,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -1723,26 +1777,34 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index 491428154..0facfd4ee 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -26759,6 +26759,7 @@ declare var Response: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement) */ interface SVGAElement extends SVGGraphicsElement, SVGURIReference { + download: string; /** * The **`rel`** property of the SVGAElement returns a string reflecting the value of the `rel` attribute of the SVG a element. * @@ -29139,6 +29140,7 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox { readonly SVG_MARKER_ORIENT_UNKNOWN: 0; readonly SVG_MARKER_ORIENT_AUTO: 1; readonly SVG_MARKER_ORIENT_ANGLE: 2; + readonly SVG_MARKER_ORIENT_AUTO_START_REVERSE: 3; addEventListener(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -29154,6 +29156,7 @@ declare var SVGMarkerElement: { readonly SVG_MARKER_ORIENT_UNKNOWN: 0; readonly SVG_MARKER_ORIENT_AUTO: 1; readonly SVG_MARKER_ORIENT_ANGLE: 2; + readonly SVG_MARKER_ORIENT_AUTO_START_REVERSE: 3; }; /** @@ -29798,7 +29801,7 @@ interface SVGSVGElement extends SVGGraphicsElement, SVGFitToViewBox, WindowEvent * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGSVGElement/getElementById) */ - getElementById(elementId: string): Element; + getElementById(elementId: string): Element | null; getEnclosureList(rect: DOMRectReadOnly, referenceElement: SVGElement | null): NodeListOf; getIntersectionList(rect: DOMRectReadOnly, referenceElement: SVGElement | null): NodeListOf; /** @@ -29973,6 +29976,11 @@ declare var SVGStringList: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGStyleElement) */ interface SVGStyleElement extends SVGElement, LinkStyle { + /** + * The **`SVGStyleElement.disabled`** property can be used to get and set whether the stylesheet is disabled (`true`) or not (`false`). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGStyleElement/disabled) + */ disabled: boolean; /** * The **`SVGStyleElement.media`** property is a media query string corresponding to the `media` attribute of the given SVG style element. @@ -31095,12 +31103,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -31296,10 +31298,15 @@ interface SourceBuffer extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/mode) */ mode: AppendMode; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/abort_event) */ onabort: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/error_event) */ onerror: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/update_event) */ onupdate: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/updateend_event) */ onupdateend: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/updatestart_event) */ onupdatestart: ((this: SourceBuffer, ev: Event) => any) | null; /** * The **`timestampOffset`** property of the SourceBuffer interface controls the offset applied to timestamps inside media segments that are appended to the `SourceBuffer`. @@ -38349,6 +38356,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -38409,7 +38447,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -38427,7 +38465,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -38468,25 +38506,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -38494,14 +38532,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -38517,9 +38573,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -38532,30 +38593,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.6/serviceworker.generated.d.ts b/baselines/ts5.6/serviceworker.generated.d.ts index d9e9d03da..3d1c96d29 100644 --- a/baselines/ts5.6/serviceworker.generated.d.ts +++ b/baselines/ts5.6/serviceworker.generated.d.ts @@ -6241,6 +6241,12 @@ declare var PushManager: { readonly supportedContentEncodings: ReadonlyArray; }; +/** Available only in secure contexts. */ +interface PushManagerAttribute { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */ + readonly pushManager: PushManager; +} + /** * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats. * Available only in secure contexts. @@ -7110,7 +7116,7 @@ interface ServiceWorkerRegistrationEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration) */ -interface ServiceWorkerRegistration extends EventTarget { +interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute { /** * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`. * @@ -7137,12 +7143,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -11049,6 +11049,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -11109,7 +11140,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -11127,7 +11158,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -11168,25 +11199,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -11194,14 +11225,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -11217,9 +11266,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -11232,30 +11286,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.6/sharedworker.generated.d.ts b/baselines/ts5.6/sharedworker.generated.d.ts index ffb0f7c46..9ecf08e31 100644 --- a/baselines/ts5.6/sharedworker.generated.d.ts +++ b/baselines/ts5.6/sharedworker.generated.d.ts @@ -6633,12 +6633,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -10775,6 +10769,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -10835,7 +10860,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -10853,7 +10878,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -10894,25 +10919,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -10920,14 +10945,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -10943,9 +10986,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -10958,30 +11006,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.6/webworker.generated.d.ts b/baselines/ts5.6/webworker.generated.d.ts index ce27127ff..bd5d652e3 100644 --- a/baselines/ts5.6/webworker.generated.d.ts +++ b/baselines/ts5.6/webworker.generated.d.ts @@ -7102,6 +7102,12 @@ declare var PushManager: { readonly supportedContentEncodings: ReadonlyArray; }; +/** Available only in secure contexts. */ +interface PushManagerAttribute { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */ + readonly pushManager: PushManager; +} + /** * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats. * Available only in secure contexts. @@ -8212,7 +8218,7 @@ interface ServiceWorkerRegistrationEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration) */ -interface ServiceWorkerRegistration extends EventTarget { +interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute { /** * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`. * @@ -8239,12 +8245,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -12703,6 +12703,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -12763,7 +12794,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -12781,7 +12812,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -12822,25 +12853,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -12848,14 +12879,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -12871,9 +12920,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -12886,30 +12940,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.9/audioworklet.generated.d.ts b/baselines/ts5.9/audioworklet.generated.d.ts index 9da97fb24..fced6a0ba 100644 --- a/baselines/ts5.9/audioworklet.generated.d.ts +++ b/baselines/ts5.9/audioworklet.generated.d.ts @@ -1540,6 +1540,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -1600,7 +1631,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -1618,7 +1649,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -1659,25 +1690,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -1685,14 +1716,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -1708,9 +1757,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -1723,26 +1777,34 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.9/dom.generated.d.ts b/baselines/ts5.9/dom.generated.d.ts index 96f357d66..91787efe1 100644 --- a/baselines/ts5.9/dom.generated.d.ts +++ b/baselines/ts5.9/dom.generated.d.ts @@ -26759,6 +26759,7 @@ declare var Response: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement) */ interface SVGAElement extends SVGGraphicsElement, SVGURIReference { + download: string; /** * The **`rel`** property of the SVGAElement returns a string reflecting the value of the `rel` attribute of the SVG a element. * @@ -29139,6 +29140,7 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox { readonly SVG_MARKER_ORIENT_UNKNOWN: 0; readonly SVG_MARKER_ORIENT_AUTO: 1; readonly SVG_MARKER_ORIENT_ANGLE: 2; + readonly SVG_MARKER_ORIENT_AUTO_START_REVERSE: 3; addEventListener(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -29154,6 +29156,7 @@ declare var SVGMarkerElement: { readonly SVG_MARKER_ORIENT_UNKNOWN: 0; readonly SVG_MARKER_ORIENT_AUTO: 1; readonly SVG_MARKER_ORIENT_ANGLE: 2; + readonly SVG_MARKER_ORIENT_AUTO_START_REVERSE: 3; }; /** @@ -29798,7 +29801,7 @@ interface SVGSVGElement extends SVGGraphicsElement, SVGFitToViewBox, WindowEvent * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGSVGElement/getElementById) */ - getElementById(elementId: string): Element; + getElementById(elementId: string): Element | null; getEnclosureList(rect: DOMRectReadOnly, referenceElement: SVGElement | null): NodeListOf; getIntersectionList(rect: DOMRectReadOnly, referenceElement: SVGElement | null): NodeListOf; /** @@ -29973,6 +29976,11 @@ declare var SVGStringList: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGStyleElement) */ interface SVGStyleElement extends SVGElement, LinkStyle { + /** + * The **`SVGStyleElement.disabled`** property can be used to get and set whether the stylesheet is disabled (`true`) or not (`false`). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGStyleElement/disabled) + */ disabled: boolean; /** * The **`SVGStyleElement.media`** property is a media query string corresponding to the `media` attribute of the given SVG style element. @@ -31095,12 +31103,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -31296,10 +31298,15 @@ interface SourceBuffer extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/mode) */ mode: AppendMode; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/abort_event) */ onabort: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/error_event) */ onerror: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/update_event) */ onupdate: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/updateend_event) */ onupdateend: ((this: SourceBuffer, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SourceBuffer/updatestart_event) */ onupdatestart: ((this: SourceBuffer, ev: Event) => any) | null; /** * The **`timestampOffset`** property of the SourceBuffer interface controls the offset applied to timestamps inside media segments that are appended to the `SourceBuffer`. @@ -38349,6 +38356,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -38409,7 +38447,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -38427,7 +38465,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -38468,25 +38506,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -38494,14 +38532,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -38517,9 +38573,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -38532,30 +38593,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.9/serviceworker.generated.d.ts b/baselines/ts5.9/serviceworker.generated.d.ts index 7078e604b..2187683f0 100644 --- a/baselines/ts5.9/serviceworker.generated.d.ts +++ b/baselines/ts5.9/serviceworker.generated.d.ts @@ -6241,6 +6241,12 @@ declare var PushManager: { readonly supportedContentEncodings: ReadonlyArray; }; +/** Available only in secure contexts. */ +interface PushManagerAttribute { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */ + readonly pushManager: PushManager; +} + /** * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats. * Available only in secure contexts. @@ -7110,7 +7116,7 @@ interface ServiceWorkerRegistrationEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration) */ -interface ServiceWorkerRegistration extends EventTarget { +interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute { /** * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`. * @@ -7137,12 +7143,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -11049,6 +11049,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -11109,7 +11140,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -11127,7 +11158,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -11168,25 +11199,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -11194,14 +11225,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -11217,9 +11266,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -11232,30 +11286,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.9/sharedworker.generated.d.ts b/baselines/ts5.9/sharedworker.generated.d.ts index adef4285f..369576057 100644 --- a/baselines/ts5.9/sharedworker.generated.d.ts +++ b/baselines/ts5.9/sharedworker.generated.d.ts @@ -6633,12 +6633,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -10775,6 +10769,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -10835,7 +10860,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -10853,7 +10878,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -10894,25 +10919,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -10920,14 +10945,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -10943,9 +10986,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -10958,30 +11006,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/ts5.9/webworker.generated.d.ts b/baselines/ts5.9/webworker.generated.d.ts index 03c770eb1..dcce06f47 100644 --- a/baselines/ts5.9/webworker.generated.d.ts +++ b/baselines/ts5.9/webworker.generated.d.ts @@ -7102,6 +7102,12 @@ declare var PushManager: { readonly supportedContentEncodings: ReadonlyArray; }; +/** Available only in secure contexts. */ +interface PushManagerAttribute { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */ + readonly pushManager: PushManager; +} + /** * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats. * Available only in secure contexts. @@ -8212,7 +8218,7 @@ interface ServiceWorkerRegistrationEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration) */ -interface ServiceWorkerRegistration extends EventTarget { +interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute { /** * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`. * @@ -8239,12 +8245,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -12703,6 +12703,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -12763,7 +12794,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -12781,7 +12812,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -12822,25 +12853,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -12848,14 +12879,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -12871,9 +12920,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -12886,30 +12940,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 4abeaa26c..05cbf1964 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -7105,6 +7105,12 @@ declare var PushManager: { readonly supportedContentEncodings: ReadonlyArray; }; +/** Available only in secure contexts. */ +interface PushManagerAttribute { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */ + readonly pushManager: PushManager; +} + /** * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats. * Available only in secure contexts. @@ -8215,7 +8221,7 @@ interface ServiceWorkerRegistrationEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration) */ -interface ServiceWorkerRegistration extends EventTarget { +interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute { /** * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`. * @@ -8242,12 +8248,6 @@ interface ServiceWorkerRegistration extends EventTarget { readonly navigationPreload: NavigationPreloadManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; - /** - * The **`pushManager`** read-only property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) - */ - readonly pushManager: PushManager; /** * The **`scope`** read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. * @@ -12706,6 +12706,37 @@ declare namespace WebAssembly { (message?: string): CompileError; }; + /** + * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception) + */ + interface Exception { + /** + * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack) + */ + readonly stack: string | undefined; + /** + * The **`getArg()`** prototype method of the `Exception` object can be used to get the value of a specified item in the exception's data arguments. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg) + */ + getArg(index: number): any; + /** + * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is) + */ + is(exceptionTag: Tag): boolean; + } + + var Exception: { + prototype: Exception; + new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + }; + /** * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. * @@ -12766,7 +12797,7 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ - grow(delta: number): number; + grow(delta: AddressValue): AddressValue; } var Memory: { @@ -12784,7 +12815,7 @@ declare namespace WebAssembly { var Module: { prototype: Module; - new(bytes: BufferSource): Module; + new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module; /** * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name. * @@ -12825,25 +12856,25 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length) */ - readonly length: number; + readonly length: AddressValue; /** * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get) */ - get(index: number): any; + get(index: AddressValue): any; /** * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow) */ - grow(delta: number, value?: any): number; + grow(delta: AddressValue, value?: any): AddressValue; /** * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set) */ - set(index: number, value?: any): void; + set(index: AddressValue, value?: any): void; } var Table: { @@ -12851,14 +12882,32 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; + /** + * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code. + * + * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag) + */ + interface Tag { + } + + var Tag: { + prototype: Tag; + new(type: TagType): Tag; + }; + + interface ExceptionOptions { + traceStack?: boolean; + } + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -12874,9 +12923,14 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; + } + + interface TagType { + parameters: ValueType[]; } interface ValueTypeMap { @@ -12889,30 +12943,38 @@ declare namespace WebAssembly { v128: never; } + interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type AddressType = "i32" | "i64"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; + type AddressValue = number; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; type ValueType = keyof ValueTypeMap; + var JSTag: Tag; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */ - function compile(bytes: BufferSource): Promise; + function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */ - function compileStreaming(source: Response | PromiseLike): Promise; + function compileStreaming(source: Response | PromiseLike, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */ - function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; function instantiate(moduleObject: Module, importObject?: Imports): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */ - function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports): Promise; + function instantiateStreaming(source: Response | PromiseLike, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */ - function validate(bytes: BufferSource): boolean; + function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean; } /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */ diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 0cf4b399c..a74ea03ff 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -3725,6 +3725,9 @@ "[property: string]: string | number | null | undefined" ] }, + "ExceptionOptions": { + "legacyNamespace": "WebAssembly" + }, "PermissionDescriptor": { "members": { "member": { @@ -3830,6 +3833,9 @@ } } }, + "TagType": { + "legacyNamespace": "WebAssembly" + }, // TextEncoderEncodeIntoResult is used only for return type, always with all fields defined "TextEncoderEncodeIntoResult": { "members": { @@ -3957,6 +3963,9 @@ } } }, + "WebAssemblyCompileOptions": { + "legacyNamespace": "WebAssembly" + }, "WebAssemblyInstantiatedSource": { "legacyNamespace": "WebAssembly" }, @@ -4034,6 +4043,12 @@ } ], "overrideType": "ReadableStreamDefaultReader | ReadableStreamBYOBReader" + }, + { + "name": "AddressValue", + "legacyNamespace": "WebAssembly", + // This should be "number | bigint" but we can't break es2015 compat + "type": "long" } ] }, diff --git a/inputfiles/patches/push.kdl b/inputfiles/patches/push.kdl new file mode 100644 index 000000000..c686fff8a --- /dev/null +++ b/inputfiles/patches/push.kdl @@ -0,0 +1,4 @@ +interface-mixin PushManagerAttribute { + // Windows support only on WebKit as of 2025-10 + property pushManager exposed=ServiceWorker +} diff --git a/inputfiles/patches/webassembly.kdl b/inputfiles/patches/webassembly.kdl index 44b43fde9..473600bc6 100644 --- a/inputfiles/patches/webassembly.kdl +++ b/inputfiles/patches/webassembly.kdl @@ -1,2 +1,3 @@ enum ImportExportKind legacyNamespace=WebAssembly enum TableKind legacyNamespace=WebAssembly +enum AddressType legacyNamespace=WebAssembly diff --git a/inputfiles/removedTypes.jsonc b/inputfiles/removedTypes.jsonc index 1d84342f0..3d716bae0 100644 --- a/inputfiles/removedTypes.jsonc +++ b/inputfiles/removedTypes.jsonc @@ -83,6 +83,11 @@ "json" // No implementation as of 2023-11 ] }, + "RTCDegradationPreference": { + "value": [ + "maintain-framerate-and-resolution" // No implementation as of 2025-10j + ] + }, "ValueType": null, "VideoColorPrimaries": { "value": [ @@ -485,7 +490,8 @@ "MediaSessionActionDetails": { "members": { "member": { - "isActivating": null // WebKit only as of 2024-10 + "enterPictureInPictureReason": null, // No implementation as of 2025-10 + "isActivating": null // WebKit only as of 2025-10 } } }, diff --git a/package-lock.json b/package-lock.json index 68cee873a..888e48c1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -396,9 +396,9 @@ } }, "node_modules/@mdn/browser-compat-data": { - "version": "7.1.8", - "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-7.1.8.tgz", - "integrity": "sha512-5ND+azfaE7xtM9vOVzikPu3WtMkCBYvKGY8omIj+zeL+jwuZIJ3g43yuHZvMfmom9wtW6UOB3nNul5oNpMS1kg==", + "version": "7.1.10", + "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-7.1.10.tgz", + "integrity": "sha512-tp11o6tT85DSj0eOKOcFwiXu5/me1HiO+0k9cbKTVJtS1+UHVyk8XJHjJo1v0iIFaZJHDY43mLuJSepcWfce8w==", "dev": true, "license": "CC0-1.0" }, @@ -1062,9 +1062,9 @@ "license": "MIT" }, "node_modules/@webref/idl": { - "version": "3.67.1", - "resolved": "https://registry.npmjs.org/@webref/idl/-/idl-3.67.1.tgz", - "integrity": "sha512-wukUWJNjk5pom+8MbgdRg4wlxYiK5kJdnD+P6P+vd/n8tyWkOTUnkIeR6b8cEMDIFByDyVgNkwtju4ndKppKgg==", + "version": "3.68.0", + "resolved": "https://registry.npmjs.org/@webref/idl/-/idl-3.68.0.tgz", + "integrity": "sha512-YbYiRRCTBOXRHiKvCasjQHKXgj2j/d8RAJbVFeABB66bg7pjQQTrRMxKjApLp2seYRKUeqNwTYrOM248PuVbjw==", "dev": true, "license": "MIT", "peerDependencies": {