diff --git a/baselines/audioworklet.generated.d.ts b/baselines/audioworklet.generated.d.ts index 9da97fb24..018e45155 100644 --- a/baselines/audioworklet.generated.d.ts +++ b/baselines/audioworklet.generated.d.ts @@ -30,6 +30,10 @@ interface EventListenerOptions { capture?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface MessageEventInit extends EventInit { data?: T; lastEventId?: string; @@ -178,6 +182,11 @@ interface UnderlyingSource { type?: ReadableStreamType; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + /** * The **`AbortController`** interface represents a controller object that allows you to abort one or more Web requests as and when desired. * @@ -1540,6 +1549,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 +1640,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 +1658,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 +1699,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 +1725,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -1708,9 +1770,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -1728,7 +1791,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -1737,12 +1800,12 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -1943,6 +2006,7 @@ declare var sampleRate: number; * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletGlobalScope/registerProcessor) */ declare function registerProcessor(name: string, processorCtor: AudioWorkletProcessorConstructor): void; +type AddressValue = any; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type BufferSource = ArrayBufferView | ArrayBuffer; type DOMHighResTimeStamp = number; @@ -1952,6 +2016,7 @@ type ReadableStreamController = ReadableStreamDefaultController | Readable type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; type Transferable = MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer; +type AddressType = "i32" | "i64"; type CompressionFormat = "deflate" | "deflate-raw" | "gzip"; type ReadableStreamReaderMode = "byob"; type ReadableStreamType = "bytes"; diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 7bb124e0c..33eb3a566 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -357,6 +357,11 @@ interface CloseEventInit extends EventInit { wasClean?: boolean; } +interface CommandEventInit extends EventInit { + command?: string; + source?: Element | null; +} + interface CompositionEventInit extends UIEventInit { data?: string; } @@ -689,6 +694,10 @@ interface EventSourceInit { withCredentials?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } @@ -1103,6 +1112,7 @@ interface MediaRecorderOptions { interface MediaSessionActionDetails { action: MediaSessionAction; + enterPictureInPictureReason?: MediaSessionEnterPictureInPictureReason; fastSeek?: boolean; seekOffset?: number; seekTime?: number; @@ -2570,6 +2580,11 @@ interface WaveShaperOptions extends AudioNodeOptions { oversample?: OverSampleType; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -3269,6 +3284,7 @@ interface AnimationTimeline { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationTimeline/currentTime) */ readonly currentTime: CSSNumberish | null; + /** The **`duration`** read-only property of the Web Animations API's AnimationTimeline interface returns the maximum value for this timeline or `null`. */ readonly duration: CSSNumberish | null; } @@ -6331,7 +6347,6 @@ interface CSSStyleProperties extends CSSStyleDeclaration { counterReset: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/counter-set) */ counterSet: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat) */ cssFloat: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cursor) */ cursor: string; @@ -8395,6 +8410,31 @@ declare var CloseEvent: { new(type: string, eventInitDict?: CloseEventInit): CloseEvent; }; +/** + * The **`CommandEvent`** interface represents an event notifying the user when a HTMLButtonElement element with valid HTMLButtonElement.commandForElement and HTMLButtonElement.command attributes is about to invoke an interactive element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent) + */ +interface CommandEvent extends Event { + /** + * The **`command`** read-only property of the CommandEvent interface returns a string containing the value of the HTMLButtonElement.command property at the time the event was dispatched. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent/command) + */ + readonly command: string; + /** + * The **`source`** read-only property of the CommandEvent interface returns an EventTarget representing the control that invoked the given command. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent/source) + */ + readonly source: Element | null; +} + +declare var CommandEvent: { + prototype: CommandEvent; + new(type: string, eventInitDict?: CommandEventInit): CommandEvent; +}; + /** * The **`Comment`** interface represents textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view. * @@ -10462,6 +10502,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve createEvent(eventInterface: "BlobEvent"): BlobEvent; createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent; createEvent(eventInterface: "CloseEvent"): CloseEvent; + createEvent(eventInterface: "CommandEvent"): CommandEvent; createEvent(eventInterface: "CompositionEvent"): CompositionEvent; createEvent(eventInterface: "ContentVisibilityAutoStateChangeEvent"): ContentVisibilityAutoStateChangeEvent; createEvent(eventInterface: "CookieChangeEvent"): CookieChangeEvent; @@ -13601,6 +13642,18 @@ declare var HTMLBodyElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement) */ interface HTMLButtonElement extends HTMLElement, PopoverTargetAttributes { + /** + * The **`command`** property of the HTMLButtonElement interface gets and sets the action to be performed on an element being controlled by this button. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/command) + */ + command: string; + /** + * The **`commandForElement`** property of the HTMLButtonElement interface gets and sets the element to control via a button. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/commandForElement) + */ + commandForElement: Element | null; /** * The **`HTMLButtonElement.disabled`** property indicates whether the control is disabled, meaning that it does not accept any clicks. * @@ -14087,7 +14140,7 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit */ innerText: string; /** - * The **`lang`** property of the HTMLElement interface indicates the base language of an element's attribute values and text content, in the form of a MISSING: RFC(5646, 'BCP 47 language identifier tag')]. + * The **`lang`** property of the HTMLElement interface indicates the base language of an element's attribute values and text content, in the form of a BCP 47 language tag. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) */ @@ -16747,7 +16800,7 @@ interface HTMLScriptElement extends HTMLElement { */ src: string; /** - * The **`text`** property of the HTMLScriptElement interface is a string that reflects the text content inside the script element. + * The **`text`** property of the HTMLScriptElement interface represents the inline text content of the script element. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/text) */ @@ -18388,6 +18441,7 @@ interface IDBDatabase extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames) */ readonly objectStoreNames: DOMStringList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ onabort: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */ onclose: ((this: IDBDatabase, ev: Event) => any) | null; @@ -23028,6 +23082,8 @@ interface ParentNode extends Node { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/append) */ append(...nodes: (Node | string)[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/moveBefore) */ + moveBefore(node: Node, child: Node | null): void; /** * Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes. * @@ -23555,6 +23611,12 @@ interface PerformanceEventTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEventTiming/cancelable) */ readonly cancelable: boolean; + /** + * The read-only **`interactionId`** property returns an ID that uniquely identifies a user interaction which triggered a series of associated events. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEventTiming/interactionId) + */ + readonly interactionId: number; /** * The read-only **`processingEnd`** property returns the time the last event handler finished executing. * @@ -24699,6 +24761,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 `PushSubscription` interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. * Available only in secure contexts. @@ -29083,6 +29151,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; @@ -29098,6 +29167,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; }; /** @@ -29742,7 +29812,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; /** @@ -29917,6 +29987,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. @@ -30567,7 +30642,13 @@ interface ScreenOrientation extends EventTarget { */ readonly type: OrientationType; /** - * The **`unlock()`** method of the ScreenOrientation interface unlocks the orientation of the containing document from its default orientation. + * The **`lock()`** method of the ScreenOrientation interface locks the orientation of the containing document to the specified orientation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/lock) + */ + lock(orientation: OrientationLockType): Promise; + /** + * The **`unlock()`** method of the ScreenOrientation interface unlocks the orientation of the containing document, effectively locking it to the default screen orientation. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/unlock) */ @@ -31006,7 +31087,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`. * @@ -31033,12 +31114,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. * @@ -36961,7 +37036,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window) */ -interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage { +interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, PushManagerAttribute, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage { /** * @deprecated This is a legacy alias of `navigator`. * @@ -38287,6 +38362,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. * @@ -38347,7 +38453,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: { @@ -38365,7 +38471,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. * @@ -38406,25 +38512,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: { @@ -38432,14 +38538,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -38455,9 +38583,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -38475,7 +38604,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -38484,16 +38613,16 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -39735,6 +39864,8 @@ declare var onwebkitanimationstart: ((this: Window, ev: Event) => any) | null; declare var onwebkittransitionend: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/wheel_event) */ declare var onwheel: ((this: Window, ev: WheelEvent) => any) | null; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */ +declare var pushManager: PushManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/afterprint_event) */ declare var onafterprint: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/beforeprint_event) */ @@ -39830,6 +39961,7 @@ declare function addEventListener(type: K, liste declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; declare function removeEventListener(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +type AddressValue = any; type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type AutoFill = AutoFillBase | `${OptionalPrefixToken}${OptionalPrefixToken}${AutoFillField}${OptionalPostfixToken}`; @@ -39909,6 +40041,7 @@ type Uint32List = Uint32Array | GLuint[]; type VibratePattern = number | number[]; type WindowProxy = Window; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; +type AddressType = "i32" | "i64"; type AlignSetting = "center" | "end" | "left" | "right" | "start"; type AlphaOption = "discard" | "keep"; type AnimationPlayState = "finished" | "idle" | "paused" | "running"; @@ -40008,6 +40141,7 @@ type MediaKeySessionType = "persistent-license" | "temporary"; type MediaKeyStatus = "expired" | "internal-error" | "output-downscaled" | "output-restricted" | "released" | "status-pending" | "usable" | "usable-in-future"; type MediaKeysRequirement = "not-allowed" | "optional" | "required"; type MediaSessionAction = "nexttrack" | "pause" | "play" | "previoustrack" | "seekbackward" | "seekforward" | "seekto" | "skipad" | "stop"; +type MediaSessionEnterPictureInPictureReason = "contentoccluded" | "other" | "useraction"; type MediaSessionPlaybackState = "none" | "paused" | "playing"; type MediaStreamTrackState = "ended" | "live"; type NavigationTimingType = "back_forward" | "navigate" | "prerender" | "reload"; @@ -40016,6 +40150,7 @@ type NotificationDirection = "auto" | "ltr" | "rtl"; type NotificationPermission = "default" | "denied" | "granted"; type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2" | "webgpu"; type OpusBitstreamFormat = "ogg" | "opus"; +type OrientationLockType = "any" | "landscape" | "landscape-primary" | "landscape-secondary" | "natural" | "portrait" | "portrait-primary" | "portrait-secondary"; type OrientationType = "landscape-primary" | "landscape-secondary" | "portrait-primary" | "portrait-secondary"; type OscillatorType = "custom" | "sawtooth" | "sine" | "square" | "triangle"; type OverSampleType = "2x" | "4x" | "none"; @@ -40033,7 +40168,7 @@ type PublicKeyCredentialType = "public-key"; type PushEncryptionKeyName = "auth" | "p256dh"; type RTCBundlePolicy = "balanced" | "max-bundle" | "max-compat"; type RTCDataChannelState = "closed" | "closing" | "connecting" | "open"; -type RTCDegradationPreference = "balanced" | "maintain-framerate" | "maintain-resolution"; +type RTCDegradationPreference = "balanced" | "maintain-framerate" | "maintain-framerate-and-resolution" | "maintain-resolution"; type RTCDtlsRole = "client" | "server" | "unknown"; type RTCDtlsTransportState = "closed" | "connected" | "connecting" | "failed" | "new"; type RTCEncodedVideoFrameType = "delta" | "empty" | "key"; diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index df04625cc..723c638e0 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -208,6 +208,10 @@ interface EventSourceInit { withCredentials?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface ExtendableCookieChangeEventInit extends ExtendableEventInit { changed?: CookieList; deleted?: CookieList; @@ -816,6 +820,11 @@ interface VideoConfiguration { width: number; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -4337,6 +4346,7 @@ interface IDBDatabase extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames) */ readonly objectStoreNames: DOMStringList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ onabort: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */ onclose: ((this: IDBDatabase, ev: Event) => any) | null; @@ -6240,6 +6250,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. @@ -7109,7 +7125,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`. * @@ -7136,12 +7152,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. * @@ -11048,6 +11058,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. * @@ -11108,7 +11149,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: { @@ -11126,7 +11167,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. * @@ -11167,25 +11208,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: { @@ -11193,14 +11234,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -11216,9 +11279,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -11236,7 +11300,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -11245,16 +11309,16 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -11598,6 +11662,7 @@ declare function addEventListener(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +type AddressValue = any; type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type BigInteger = Uint8Array; @@ -11651,6 +11716,7 @@ type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; +type AddressType = "i32" | "i64"; type BinaryType = "arraybuffer" | "blob"; type CSSMathOperator = "clamp" | "invert" | "max" | "min" | "negate" | "product" | "sum"; type CSSNumericBaseType = "angle" | "flex" | "frequency" | "length" | "percent" | "resolution" | "time"; diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index f33bbf925..90b6c1c20 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -176,6 +176,10 @@ interface EventSourceInit { withCredentials?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } @@ -746,6 +750,11 @@ interface VideoConfiguration { width: number; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -4020,6 +4029,7 @@ interface IDBDatabase extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames) */ readonly objectStoreNames: DOMStringList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ onabort: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */ onclose: ((this: IDBDatabase, ev: Event) => any) | null; @@ -5878,6 +5888,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 `PushSubscription` interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. * Available only in secure contexts. @@ -6611,7 +6627,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`. * @@ -6632,12 +6648,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. * @@ -10774,6 +10784,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. * @@ -10834,7 +10875,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: { @@ -10852,7 +10893,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. * @@ -10893,25 +10934,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: { @@ -10919,14 +10960,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -10942,9 +11005,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -10962,7 +11026,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -10971,16 +11035,16 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -11288,6 +11352,7 @@ declare function addEventListener(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +type AddressValue = any; type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type BigInteger = Uint8Array; @@ -11339,6 +11404,7 @@ type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; +type AddressType = "i32" | "i64"; type BinaryType = "arraybuffer" | "blob"; type CSSMathOperator = "clamp" | "invert" | "max" | "min" | "negate" | "product" | "sum"; type CSSNumericBaseType = "angle" | "flex" | "frequency" | "length" | "percent" | "resolution" | "time"; diff --git a/baselines/ts5.5/audioworklet.generated.d.ts b/baselines/ts5.5/audioworklet.generated.d.ts index 2b853ce56..1897855b5 100644 --- a/baselines/ts5.5/audioworklet.generated.d.ts +++ b/baselines/ts5.5/audioworklet.generated.d.ts @@ -30,6 +30,10 @@ interface EventListenerOptions { capture?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface MessageEventInit extends EventInit { data?: T; lastEventId?: string; @@ -178,6 +182,11 @@ interface UnderlyingSource { type?: ReadableStreamType; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + /** * The **`AbortController`** interface represents a controller object that allows you to abort one or more Web requests as and when desired. * @@ -1540,6 +1549,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 +1640,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 +1658,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 +1699,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 +1725,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -1708,9 +1770,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -1728,7 +1791,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -1737,12 +1800,12 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -1943,6 +2006,7 @@ declare var sampleRate: number; * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletGlobalScope/registerProcessor) */ declare function registerProcessor(name: string, processorCtor: AudioWorkletProcessorConstructor): void; +type AddressValue = any; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type BufferSource = ArrayBufferView | ArrayBuffer; type DOMHighResTimeStamp = number; @@ -1952,6 +2016,7 @@ type ReadableStreamController = ReadableStreamDefaultController | Readable type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; type Transferable = MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer; +type AddressType = "i32" | "i64"; type CompressionFormat = "deflate" | "deflate-raw" | "gzip"; type ReadableStreamReaderMode = "byob"; type ReadableStreamType = "bytes"; diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index c8c421f5b..8834d56f7 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -357,6 +357,11 @@ interface CloseEventInit extends EventInit { wasClean?: boolean; } +interface CommandEventInit extends EventInit { + command?: string; + source?: Element | null; +} + interface CompositionEventInit extends UIEventInit { data?: string; } @@ -689,6 +694,10 @@ interface EventSourceInit { withCredentials?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } @@ -1103,6 +1112,7 @@ interface MediaRecorderOptions { interface MediaSessionActionDetails { action: MediaSessionAction; + enterPictureInPictureReason?: MediaSessionEnterPictureInPictureReason; fastSeek?: boolean; seekOffset?: number; seekTime?: number; @@ -2570,6 +2580,11 @@ interface WaveShaperOptions extends AudioNodeOptions { oversample?: OverSampleType; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -3269,6 +3284,7 @@ interface AnimationTimeline { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationTimeline/currentTime) */ readonly currentTime: CSSNumberish | null; + /** The **`duration`** read-only property of the Web Animations API's AnimationTimeline interface returns the maximum value for this timeline or `null`. */ readonly duration: CSSNumberish | null; } @@ -6324,7 +6340,6 @@ interface CSSStyleProperties extends CSSStyleDeclaration { counterReset: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/counter-set) */ counterSet: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat) */ cssFloat: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cursor) */ cursor: string; @@ -8387,6 +8402,31 @@ declare var CloseEvent: { new(type: string, eventInitDict?: CloseEventInit): CloseEvent; }; +/** + * The **`CommandEvent`** interface represents an event notifying the user when a HTMLButtonElement element with valid HTMLButtonElement.commandForElement and HTMLButtonElement.command attributes is about to invoke an interactive element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent) + */ +interface CommandEvent extends Event { + /** + * The **`command`** read-only property of the CommandEvent interface returns a string containing the value of the HTMLButtonElement.command property at the time the event was dispatched. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent/command) + */ + readonly command: string; + /** + * The **`source`** read-only property of the CommandEvent interface returns an EventTarget representing the control that invoked the given command. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent/source) + */ + readonly source: Element | null; +} + +declare var CommandEvent: { + prototype: CommandEvent; + new(type: string, eventInitDict?: CommandEventInit): CommandEvent; +}; + /** * The **`Comment`** interface represents textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view. * @@ -10454,6 +10494,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve createEvent(eventInterface: "BlobEvent"): BlobEvent; createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent; createEvent(eventInterface: "CloseEvent"): CloseEvent; + createEvent(eventInterface: "CommandEvent"): CommandEvent; createEvent(eventInterface: "CompositionEvent"): CompositionEvent; createEvent(eventInterface: "ContentVisibilityAutoStateChangeEvent"): ContentVisibilityAutoStateChangeEvent; createEvent(eventInterface: "CookieChangeEvent"): CookieChangeEvent; @@ -13588,6 +13629,18 @@ declare var HTMLBodyElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement) */ interface HTMLButtonElement extends HTMLElement, PopoverTargetAttributes { + /** + * The **`command`** property of the HTMLButtonElement interface gets and sets the action to be performed on an element being controlled by this button. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/command) + */ + command: string; + /** + * The **`commandForElement`** property of the HTMLButtonElement interface gets and sets the element to control via a button. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/commandForElement) + */ + commandForElement: Element | null; /** * The **`HTMLButtonElement.disabled`** property indicates whether the control is disabled, meaning that it does not accept any clicks. * @@ -14074,7 +14127,7 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit */ innerText: string; /** - * The **`lang`** property of the HTMLElement interface indicates the base language of an element's attribute values and text content, in the form of a MISSING: RFC(5646, 'BCP 47 language identifier tag')]. + * The **`lang`** property of the HTMLElement interface indicates the base language of an element's attribute values and text content, in the form of a BCP 47 language tag. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) */ @@ -16727,7 +16780,7 @@ interface HTMLScriptElement extends HTMLElement { */ src: string; /** - * The **`text`** property of the HTMLScriptElement interface is a string that reflects the text content inside the script element. + * The **`text`** property of the HTMLScriptElement interface represents the inline text content of the script element. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/text) */ @@ -18367,6 +18420,7 @@ interface IDBDatabase extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames) */ readonly objectStoreNames: DOMStringList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ onabort: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */ onclose: ((this: IDBDatabase, ev: Event) => any) | null; @@ -23007,6 +23061,8 @@ interface ParentNode extends Node { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/append) */ append(...nodes: (Node | string)[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/moveBefore) */ + moveBefore(node: Node, child: Node | null): void; /** * Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes. * @@ -23534,6 +23590,12 @@ interface PerformanceEventTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEventTiming/cancelable) */ readonly cancelable: boolean; + /** + * The read-only **`interactionId`** property returns an ID that uniquely identifies a user interaction which triggered a series of associated events. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEventTiming/interactionId) + */ + readonly interactionId: number; /** * The read-only **`processingEnd`** property returns the time the last event handler finished executing. * @@ -24678,6 +24740,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 `PushSubscription` interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. * Available only in secure contexts. @@ -29061,6 +29129,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; @@ -29076,6 +29145,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; }; /** @@ -29720,7 +29790,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; /** @@ -29895,6 +29965,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. @@ -30545,7 +30620,13 @@ interface ScreenOrientation extends EventTarget { */ readonly type: OrientationType; /** - * The **`unlock()`** method of the ScreenOrientation interface unlocks the orientation of the containing document from its default orientation. + * The **`lock()`** method of the ScreenOrientation interface locks the orientation of the containing document to the specified orientation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/lock) + */ + lock(orientation: OrientationLockType): Promise; + /** + * The **`unlock()`** method of the ScreenOrientation interface unlocks the orientation of the containing document, effectively locking it to the default screen orientation. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/unlock) */ @@ -30984,7 +31065,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`. * @@ -31011,12 +31092,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. * @@ -36938,7 +37013,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window) */ -interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage { +interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, PushManagerAttribute, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage { /** * @deprecated This is a legacy alias of `navigator`. * @@ -38264,6 +38339,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. * @@ -38324,7 +38430,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: { @@ -38342,7 +38448,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. * @@ -38383,25 +38489,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: { @@ -38409,14 +38515,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -38432,9 +38560,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -38452,7 +38581,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -38461,16 +38590,16 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -39712,6 +39841,8 @@ declare var onwebkitanimationstart: ((this: Window, ev: Event) => any) | null; declare var onwebkittransitionend: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/wheel_event) */ declare var onwheel: ((this: Window, ev: WheelEvent) => any) | null; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */ +declare var pushManager: PushManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/afterprint_event) */ declare var onafterprint: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/beforeprint_event) */ @@ -39807,6 +39938,7 @@ declare function addEventListener(type: K, liste declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; declare function removeEventListener(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +type AddressValue = any; type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type AutoFill = AutoFillBase | `${OptionalPrefixToken}${OptionalPrefixToken}${AutoFillField}${OptionalPostfixToken}`; @@ -39886,6 +40018,7 @@ type Uint32List = Uint32Array | GLuint[]; type VibratePattern = number | number[]; type WindowProxy = Window; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; +type AddressType = "i32" | "i64"; type AlignSetting = "center" | "end" | "left" | "right" | "start"; type AlphaOption = "discard" | "keep"; type AnimationPlayState = "finished" | "idle" | "paused" | "running"; @@ -39985,6 +40118,7 @@ type MediaKeySessionType = "persistent-license" | "temporary"; type MediaKeyStatus = "expired" | "internal-error" | "output-downscaled" | "output-restricted" | "released" | "status-pending" | "usable" | "usable-in-future"; type MediaKeysRequirement = "not-allowed" | "optional" | "required"; type MediaSessionAction = "nexttrack" | "pause" | "play" | "previoustrack" | "seekbackward" | "seekforward" | "seekto" | "skipad" | "stop"; +type MediaSessionEnterPictureInPictureReason = "contentoccluded" | "other" | "useraction"; type MediaSessionPlaybackState = "none" | "paused" | "playing"; type MediaStreamTrackState = "ended" | "live"; type NavigationTimingType = "back_forward" | "navigate" | "prerender" | "reload"; @@ -39993,6 +40127,7 @@ type NotificationDirection = "auto" | "ltr" | "rtl"; type NotificationPermission = "default" | "denied" | "granted"; type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2" | "webgpu"; type OpusBitstreamFormat = "ogg" | "opus"; +type OrientationLockType = "any" | "landscape" | "landscape-primary" | "landscape-secondary" | "natural" | "portrait" | "portrait-primary" | "portrait-secondary"; type OrientationType = "landscape-primary" | "landscape-secondary" | "portrait-primary" | "portrait-secondary"; type OscillatorType = "custom" | "sawtooth" | "sine" | "square" | "triangle"; type OverSampleType = "2x" | "4x" | "none"; @@ -40010,7 +40145,7 @@ type PublicKeyCredentialType = "public-key"; type PushEncryptionKeyName = "auth" | "p256dh"; type RTCBundlePolicy = "balanced" | "max-bundle" | "max-compat"; type RTCDataChannelState = "closed" | "closing" | "connecting" | "open"; -type RTCDegradationPreference = "balanced" | "maintain-framerate" | "maintain-resolution"; +type RTCDegradationPreference = "balanced" | "maintain-framerate" | "maintain-framerate-and-resolution" | "maintain-resolution"; type RTCDtlsRole = "client" | "server" | "unknown"; type RTCDtlsTransportState = "closed" | "connected" | "connecting" | "failed" | "new"; type RTCEncodedVideoFrameType = "delta" | "empty" | "key"; diff --git a/baselines/ts5.5/serviceworker.generated.d.ts b/baselines/ts5.5/serviceworker.generated.d.ts index 72e9bdb2a..edb5e1af7 100644 --- a/baselines/ts5.5/serviceworker.generated.d.ts +++ b/baselines/ts5.5/serviceworker.generated.d.ts @@ -208,6 +208,10 @@ interface EventSourceInit { withCredentials?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface ExtendableCookieChangeEventInit extends ExtendableEventInit { changed?: CookieList; deleted?: CookieList; @@ -816,6 +820,11 @@ interface VideoConfiguration { width: number; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -4337,6 +4346,7 @@ interface IDBDatabase extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames) */ readonly objectStoreNames: DOMStringList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ onabort: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */ onclose: ((this: IDBDatabase, ev: Event) => any) | null; @@ -6240,6 +6250,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. @@ -7109,7 +7125,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`. * @@ -7136,12 +7152,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. * @@ -11048,6 +11058,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. * @@ -11108,7 +11149,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: { @@ -11126,7 +11167,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. * @@ -11167,25 +11208,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: { @@ -11193,14 +11234,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -11216,9 +11279,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -11236,7 +11300,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -11245,16 +11309,16 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -11598,6 +11662,7 @@ declare function addEventListener(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +type AddressValue = any; type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type BigInteger = Uint8Array; @@ -11651,6 +11716,7 @@ type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; +type AddressType = "i32" | "i64"; type BinaryType = "arraybuffer" | "blob"; type CSSMathOperator = "clamp" | "invert" | "max" | "min" | "negate" | "product" | "sum"; type CSSNumericBaseType = "angle" | "flex" | "frequency" | "length" | "percent" | "resolution" | "time"; diff --git a/baselines/ts5.5/sharedworker.generated.d.ts b/baselines/ts5.5/sharedworker.generated.d.ts index 9a1f96ea3..fe5bc548c 100644 --- a/baselines/ts5.5/sharedworker.generated.d.ts +++ b/baselines/ts5.5/sharedworker.generated.d.ts @@ -176,6 +176,10 @@ interface EventSourceInit { withCredentials?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } @@ -746,6 +750,11 @@ interface VideoConfiguration { width: number; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -4020,6 +4029,7 @@ interface IDBDatabase extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames) */ readonly objectStoreNames: DOMStringList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ onabort: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */ onclose: ((this: IDBDatabase, ev: Event) => any) | null; @@ -5878,6 +5888,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 `PushSubscription` interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. * Available only in secure contexts. @@ -6611,7 +6627,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`. * @@ -6632,12 +6648,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. * @@ -10774,6 +10784,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. * @@ -10834,7 +10875,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: { @@ -10852,7 +10893,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. * @@ -10893,25 +10934,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: { @@ -10919,14 +10960,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -10942,9 +11005,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -10962,7 +11026,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -10971,16 +11035,16 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -11288,6 +11352,7 @@ declare function addEventListener(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +type AddressValue = any; type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type BigInteger = Uint8Array; @@ -11339,6 +11404,7 @@ type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; +type AddressType = "i32" | "i64"; type BinaryType = "arraybuffer" | "blob"; type CSSMathOperator = "clamp" | "invert" | "max" | "min" | "negate" | "product" | "sum"; type CSSNumericBaseType = "angle" | "flex" | "frequency" | "length" | "percent" | "resolution" | "time"; diff --git a/baselines/ts5.5/webworker.generated.d.ts b/baselines/ts5.5/webworker.generated.d.ts index ace6d6066..2a74d4658 100644 --- a/baselines/ts5.5/webworker.generated.d.ts +++ b/baselines/ts5.5/webworker.generated.d.ts @@ -288,6 +288,10 @@ interface EventSourceInit { withCredentials?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface ExtendableCookieChangeEventInit extends ExtendableEventInit { changed?: CookieList; deleted?: CookieList; @@ -1054,6 +1058,11 @@ interface VideoFrameInit { visibleRect?: DOMRectInit; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -5029,6 +5038,7 @@ interface IDBDatabase extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames) */ readonly objectStoreNames: DOMStringList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ onabort: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */ onclose: ((this: IDBDatabase, ev: Event) => any) | null; @@ -7101,6 +7111,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. @@ -8211,7 +8227,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`. * @@ -8238,12 +8254,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. * @@ -12702,6 +12712,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. * @@ -12762,7 +12803,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: { @@ -12780,7 +12821,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. * @@ -12821,25 +12862,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: { @@ -12847,14 +12888,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -12870,9 +12933,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -12890,7 +12954,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -12899,16 +12963,16 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -13255,6 +13319,7 @@ declare function addEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +type AddressValue = any; type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type BigInteger = Uint8Array; @@ -13309,6 +13374,7 @@ type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHan type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; +type AddressType = "i32" | "i64"; type AlphaOption = "discard" | "keep"; type AudioSampleFormat = "f32" | "f32-planar" | "s16" | "s16-planar" | "s32" | "s32-planar" | "u8" | "u8-planar"; type AvcBitstreamFormat = "annexb" | "avc"; diff --git a/baselines/ts5.6/audioworklet.generated.d.ts b/baselines/ts5.6/audioworklet.generated.d.ts index 2b853ce56..1897855b5 100644 --- a/baselines/ts5.6/audioworklet.generated.d.ts +++ b/baselines/ts5.6/audioworklet.generated.d.ts @@ -30,6 +30,10 @@ interface EventListenerOptions { capture?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface MessageEventInit extends EventInit { data?: T; lastEventId?: string; @@ -178,6 +182,11 @@ interface UnderlyingSource { type?: ReadableStreamType; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + /** * The **`AbortController`** interface represents a controller object that allows you to abort one or more Web requests as and when desired. * @@ -1540,6 +1549,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 +1640,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 +1658,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 +1699,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 +1725,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -1708,9 +1770,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -1728,7 +1791,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -1737,12 +1800,12 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -1943,6 +2006,7 @@ declare var sampleRate: number; * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletGlobalScope/registerProcessor) */ declare function registerProcessor(name: string, processorCtor: AudioWorkletProcessorConstructor): void; +type AddressValue = any; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type BufferSource = ArrayBufferView | ArrayBuffer; type DOMHighResTimeStamp = number; @@ -1952,6 +2016,7 @@ type ReadableStreamController = ReadableStreamDefaultController | Readable type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; type Transferable = MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer; +type AddressType = "i32" | "i64"; type CompressionFormat = "deflate" | "deflate-raw" | "gzip"; type ReadableStreamReaderMode = "byob"; type ReadableStreamType = "bytes"; diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index 98a5f56f0..545ef10b0 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -357,6 +357,11 @@ interface CloseEventInit extends EventInit { wasClean?: boolean; } +interface CommandEventInit extends EventInit { + command?: string; + source?: Element | null; +} + interface CompositionEventInit extends UIEventInit { data?: string; } @@ -689,6 +694,10 @@ interface EventSourceInit { withCredentials?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } @@ -1103,6 +1112,7 @@ interface MediaRecorderOptions { interface MediaSessionActionDetails { action: MediaSessionAction; + enterPictureInPictureReason?: MediaSessionEnterPictureInPictureReason; fastSeek?: boolean; seekOffset?: number; seekTime?: number; @@ -2570,6 +2580,11 @@ interface WaveShaperOptions extends AudioNodeOptions { oversample?: OverSampleType; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -3269,6 +3284,7 @@ interface AnimationTimeline { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationTimeline/currentTime) */ readonly currentTime: CSSNumberish | null; + /** The **`duration`** read-only property of the Web Animations API's AnimationTimeline interface returns the maximum value for this timeline or `null`. */ readonly duration: CSSNumberish | null; } @@ -6331,7 +6347,6 @@ interface CSSStyleProperties extends CSSStyleDeclaration { counterReset: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/counter-set) */ counterSet: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat) */ cssFloat: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cursor) */ cursor: string; @@ -8395,6 +8410,31 @@ declare var CloseEvent: { new(type: string, eventInitDict?: CloseEventInit): CloseEvent; }; +/** + * The **`CommandEvent`** interface represents an event notifying the user when a HTMLButtonElement element with valid HTMLButtonElement.commandForElement and HTMLButtonElement.command attributes is about to invoke an interactive element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent) + */ +interface CommandEvent extends Event { + /** + * The **`command`** read-only property of the CommandEvent interface returns a string containing the value of the HTMLButtonElement.command property at the time the event was dispatched. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent/command) + */ + readonly command: string; + /** + * The **`source`** read-only property of the CommandEvent interface returns an EventTarget representing the control that invoked the given command. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent/source) + */ + readonly source: Element | null; +} + +declare var CommandEvent: { + prototype: CommandEvent; + new(type: string, eventInitDict?: CommandEventInit): CommandEvent; +}; + /** * The **`Comment`** interface represents textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view. * @@ -10462,6 +10502,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve createEvent(eventInterface: "BlobEvent"): BlobEvent; createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent; createEvent(eventInterface: "CloseEvent"): CloseEvent; + createEvent(eventInterface: "CommandEvent"): CommandEvent; createEvent(eventInterface: "CompositionEvent"): CompositionEvent; createEvent(eventInterface: "ContentVisibilityAutoStateChangeEvent"): ContentVisibilityAutoStateChangeEvent; createEvent(eventInterface: "CookieChangeEvent"): CookieChangeEvent; @@ -13601,6 +13642,18 @@ declare var HTMLBodyElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement) */ interface HTMLButtonElement extends HTMLElement, PopoverTargetAttributes { + /** + * The **`command`** property of the HTMLButtonElement interface gets and sets the action to be performed on an element being controlled by this button. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/command) + */ + command: string; + /** + * The **`commandForElement`** property of the HTMLButtonElement interface gets and sets the element to control via a button. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/commandForElement) + */ + commandForElement: Element | null; /** * The **`HTMLButtonElement.disabled`** property indicates whether the control is disabled, meaning that it does not accept any clicks. * @@ -14087,7 +14140,7 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit */ innerText: string; /** - * The **`lang`** property of the HTMLElement interface indicates the base language of an element's attribute values and text content, in the form of a MISSING: RFC(5646, 'BCP 47 language identifier tag')]. + * The **`lang`** property of the HTMLElement interface indicates the base language of an element's attribute values and text content, in the form of a BCP 47 language tag. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang) */ @@ -16747,7 +16800,7 @@ interface HTMLScriptElement extends HTMLElement { */ src: string; /** - * The **`text`** property of the HTMLScriptElement interface is a string that reflects the text content inside the script element. + * The **`text`** property of the HTMLScriptElement interface represents the inline text content of the script element. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/text) */ @@ -18388,6 +18441,7 @@ interface IDBDatabase extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames) */ readonly objectStoreNames: DOMStringList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ onabort: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */ onclose: ((this: IDBDatabase, ev: Event) => any) | null; @@ -23028,6 +23082,8 @@ interface ParentNode extends Node { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/append) */ append(...nodes: (Node | string)[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/moveBefore) */ + moveBefore(node: Node, child: Node | null): void; /** * Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes. * @@ -23555,6 +23611,12 @@ interface PerformanceEventTiming extends PerformanceEntry { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEventTiming/cancelable) */ readonly cancelable: boolean; + /** + * The read-only **`interactionId`** property returns an ID that uniquely identifies a user interaction which triggered a series of associated events. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEventTiming/interactionId) + */ + readonly interactionId: number; /** * The read-only **`processingEnd`** property returns the time the last event handler finished executing. * @@ -24699,6 +24761,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 `PushSubscription` interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. * Available only in secure contexts. @@ -29083,6 +29151,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; @@ -29098,6 +29167,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; }; /** @@ -29742,7 +29812,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; /** @@ -29917,6 +29987,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. @@ -30567,7 +30642,13 @@ interface ScreenOrientation extends EventTarget { */ readonly type: OrientationType; /** - * The **`unlock()`** method of the ScreenOrientation interface unlocks the orientation of the containing document from its default orientation. + * The **`lock()`** method of the ScreenOrientation interface locks the orientation of the containing document to the specified orientation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/lock) + */ + lock(orientation: OrientationLockType): Promise; + /** + * The **`unlock()`** method of the ScreenOrientation interface unlocks the orientation of the containing document, effectively locking it to the default screen orientation. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/unlock) */ @@ -31006,7 +31087,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`. * @@ -31033,12 +31114,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. * @@ -36961,7 +37036,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window) */ -interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage { +interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, PushManagerAttribute, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage { /** * @deprecated This is a legacy alias of `navigator`. * @@ -38287,6 +38362,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. * @@ -38347,7 +38453,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: { @@ -38365,7 +38471,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. * @@ -38406,25 +38512,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: { @@ -38432,14 +38538,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -38455,9 +38583,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -38475,7 +38604,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -38484,16 +38613,16 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -39735,6 +39864,8 @@ declare var onwebkitanimationstart: ((this: Window, ev: Event) => any) | null; declare var onwebkittransitionend: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/wheel_event) */ declare var onwheel: ((this: Window, ev: WheelEvent) => any) | null; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */ +declare var pushManager: PushManager; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/afterprint_event) */ declare var onafterprint: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/beforeprint_event) */ @@ -39830,6 +39961,7 @@ declare function addEventListener(type: K, liste declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; declare function removeEventListener(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +type AddressValue = any; type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type AutoFill = AutoFillBase | `${OptionalPrefixToken}${OptionalPrefixToken}${AutoFillField}${OptionalPostfixToken}`; @@ -39909,6 +40041,7 @@ type Uint32List = Uint32Array | GLuint[]; type VibratePattern = number | number[]; type WindowProxy = Window; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; +type AddressType = "i32" | "i64"; type AlignSetting = "center" | "end" | "left" | "right" | "start"; type AlphaOption = "discard" | "keep"; type AnimationPlayState = "finished" | "idle" | "paused" | "running"; @@ -40008,6 +40141,7 @@ type MediaKeySessionType = "persistent-license" | "temporary"; type MediaKeyStatus = "expired" | "internal-error" | "output-downscaled" | "output-restricted" | "released" | "status-pending" | "usable" | "usable-in-future"; type MediaKeysRequirement = "not-allowed" | "optional" | "required"; type MediaSessionAction = "nexttrack" | "pause" | "play" | "previoustrack" | "seekbackward" | "seekforward" | "seekto" | "skipad" | "stop"; +type MediaSessionEnterPictureInPictureReason = "contentoccluded" | "other" | "useraction"; type MediaSessionPlaybackState = "none" | "paused" | "playing"; type MediaStreamTrackState = "ended" | "live"; type NavigationTimingType = "back_forward" | "navigate" | "prerender" | "reload"; @@ -40016,6 +40150,7 @@ type NotificationDirection = "auto" | "ltr" | "rtl"; type NotificationPermission = "default" | "denied" | "granted"; type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2" | "webgpu"; type OpusBitstreamFormat = "ogg" | "opus"; +type OrientationLockType = "any" | "landscape" | "landscape-primary" | "landscape-secondary" | "natural" | "portrait" | "portrait-primary" | "portrait-secondary"; type OrientationType = "landscape-primary" | "landscape-secondary" | "portrait-primary" | "portrait-secondary"; type OscillatorType = "custom" | "sawtooth" | "sine" | "square" | "triangle"; type OverSampleType = "2x" | "4x" | "none"; @@ -40033,7 +40168,7 @@ type PublicKeyCredentialType = "public-key"; type PushEncryptionKeyName = "auth" | "p256dh"; type RTCBundlePolicy = "balanced" | "max-bundle" | "max-compat"; type RTCDataChannelState = "closed" | "closing" | "connecting" | "open"; -type RTCDegradationPreference = "balanced" | "maintain-framerate" | "maintain-resolution"; +type RTCDegradationPreference = "balanced" | "maintain-framerate" | "maintain-framerate-and-resolution" | "maintain-resolution"; type RTCDtlsRole = "client" | "server" | "unknown"; type RTCDtlsTransportState = "closed" | "connected" | "connecting" | "failed" | "new"; type RTCEncodedVideoFrameType = "delta" | "empty" | "key"; diff --git a/baselines/ts5.6/serviceworker.generated.d.ts b/baselines/ts5.6/serviceworker.generated.d.ts index 72e9bdb2a..edb5e1af7 100644 --- a/baselines/ts5.6/serviceworker.generated.d.ts +++ b/baselines/ts5.6/serviceworker.generated.d.ts @@ -208,6 +208,10 @@ interface EventSourceInit { withCredentials?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface ExtendableCookieChangeEventInit extends ExtendableEventInit { changed?: CookieList; deleted?: CookieList; @@ -816,6 +820,11 @@ interface VideoConfiguration { width: number; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -4337,6 +4346,7 @@ interface IDBDatabase extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames) */ readonly objectStoreNames: DOMStringList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ onabort: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */ onclose: ((this: IDBDatabase, ev: Event) => any) | null; @@ -6240,6 +6250,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. @@ -7109,7 +7125,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`. * @@ -7136,12 +7152,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. * @@ -11048,6 +11058,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. * @@ -11108,7 +11149,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: { @@ -11126,7 +11167,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. * @@ -11167,25 +11208,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: { @@ -11193,14 +11234,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -11216,9 +11279,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -11236,7 +11300,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -11245,16 +11309,16 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -11598,6 +11662,7 @@ declare function addEventListener(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +type AddressValue = any; type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type BigInteger = Uint8Array; @@ -11651,6 +11716,7 @@ type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; +type AddressType = "i32" | "i64"; type BinaryType = "arraybuffer" | "blob"; type CSSMathOperator = "clamp" | "invert" | "max" | "min" | "negate" | "product" | "sum"; type CSSNumericBaseType = "angle" | "flex" | "frequency" | "length" | "percent" | "resolution" | "time"; diff --git a/baselines/ts5.6/sharedworker.generated.d.ts b/baselines/ts5.6/sharedworker.generated.d.ts index 9a1f96ea3..fe5bc548c 100644 --- a/baselines/ts5.6/sharedworker.generated.d.ts +++ b/baselines/ts5.6/sharedworker.generated.d.ts @@ -176,6 +176,10 @@ interface EventSourceInit { withCredentials?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } @@ -746,6 +750,11 @@ interface VideoConfiguration { width: number; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -4020,6 +4029,7 @@ interface IDBDatabase extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames) */ readonly objectStoreNames: DOMStringList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ onabort: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */ onclose: ((this: IDBDatabase, ev: Event) => any) | null; @@ -5878,6 +5888,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 `PushSubscription` interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. * Available only in secure contexts. @@ -6611,7 +6627,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`. * @@ -6632,12 +6648,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. * @@ -10774,6 +10784,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. * @@ -10834,7 +10875,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: { @@ -10852,7 +10893,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. * @@ -10893,25 +10934,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: { @@ -10919,14 +10960,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -10942,9 +11005,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -10962,7 +11026,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -10971,16 +11035,16 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -11288,6 +11352,7 @@ declare function addEventListener(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +type AddressValue = any; type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type BigInteger = Uint8Array; @@ -11339,6 +11404,7 @@ type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; +type AddressType = "i32" | "i64"; type BinaryType = "arraybuffer" | "blob"; type CSSMathOperator = "clamp" | "invert" | "max" | "min" | "negate" | "product" | "sum"; type CSSNumericBaseType = "angle" | "flex" | "frequency" | "length" | "percent" | "resolution" | "time"; diff --git a/baselines/ts5.6/webworker.generated.d.ts b/baselines/ts5.6/webworker.generated.d.ts index ace6d6066..2a74d4658 100644 --- a/baselines/ts5.6/webworker.generated.d.ts +++ b/baselines/ts5.6/webworker.generated.d.ts @@ -288,6 +288,10 @@ interface EventSourceInit { withCredentials?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface ExtendableCookieChangeEventInit extends ExtendableEventInit { changed?: CookieList; deleted?: CookieList; @@ -1054,6 +1058,11 @@ interface VideoFrameInit { visibleRect?: DOMRectInit; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -5029,6 +5038,7 @@ interface IDBDatabase extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames) */ readonly objectStoreNames: DOMStringList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ onabort: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */ onclose: ((this: IDBDatabase, ev: Event) => any) | null; @@ -7101,6 +7111,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. @@ -8211,7 +8227,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`. * @@ -8238,12 +8254,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. * @@ -12702,6 +12712,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. * @@ -12762,7 +12803,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: { @@ -12780,7 +12821,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. * @@ -12821,25 +12862,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: { @@ -12847,14 +12888,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -12870,9 +12933,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -12890,7 +12954,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -12899,16 +12963,16 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -13255,6 +13319,7 @@ declare function addEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +type AddressValue = any; type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type BigInteger = Uint8Array; @@ -13309,6 +13374,7 @@ type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHan type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; +type AddressType = "i32" | "i64"; type AlphaOption = "discard" | "keep"; type AudioSampleFormat = "f32" | "f32-planar" | "s16" | "s16-planar" | "s32" | "s32-planar" | "u8" | "u8-planar"; type AvcBitstreamFormat = "annexb" | "avc"; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 3943e0e49..e708882cc 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -288,6 +288,10 @@ interface EventSourceInit { withCredentials?: boolean; } +interface ExceptionOptions { + traceStack?: boolean; +} + interface ExtendableCookieChangeEventInit extends ExtendableEventInit { changed?: CookieList; deleted?: CookieList; @@ -1054,6 +1058,11 @@ interface VideoFrameInit { visibleRect?: DOMRectInit; } +interface WebAssemblyCompileOptions { + builtins?: string[]; + importedStringConstants?: string | null; +} + interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -5029,6 +5038,7 @@ interface IDBDatabase extends EventTarget { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames) */ readonly objectStoreNames: DOMStringList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ onabort: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */ onclose: ((this: IDBDatabase, ev: Event) => any) | null; @@ -7101,6 +7111,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. @@ -8211,7 +8227,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`. * @@ -8238,12 +8254,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. * @@ -12702,6 +12712,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. * @@ -12762,7 +12803,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: { @@ -12780,7 +12821,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. * @@ -12821,25 +12862,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: { @@ -12847,14 +12888,36 @@ 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 TagType { + } + + var TagType: { + prototype: TagType; + new(): TagType; + }; + interface GlobalDescriptor { mutable?: boolean; value: T; } interface MemoryDescriptor { - initial: number; - maximum?: number; + address?: AddressType; + initial: AddressValue; + maximum?: AddressValue; shared?: boolean; } @@ -12870,9 +12933,10 @@ declare namespace WebAssembly { } interface TableDescriptor { + address?: AddressType; element: TableKind; - initial: number; - maximum?: number; + initial: AddressValue; + maximum?: AddressValue; } interface ValueTypeMap { @@ -12890,7 +12954,7 @@ declare namespace WebAssembly { module: Module; } - type ImportExportKind = "function" | "global" | "memory" | "table"; + type ImportExportKind = "function" | "global" | "memory" | "table" | "tag"; type TableKind = "anyfunc" | "externref"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; @@ -12899,16 +12963,16 @@ declare namespace WebAssembly { type ModuleImports = Record; type ValueType = keyof ValueTypeMap; /** [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). */ @@ -13255,6 +13319,7 @@ declare function addEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +type AddressValue = any; type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView; type BigInteger = Uint8Array; @@ -13309,6 +13374,7 @@ type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHan type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; +type AddressType = "i32" | "i64"; type AlphaOption = "discard" | "keep"; type AudioSampleFormat = "f32" | "f32-planar" | "s16" | "s16-planar" | "s32" | "s32-planar" | "u8" | "u8-planar"; type AvcBitstreamFormat = "annexb" | "avc"; diff --git a/inputfiles/addedTypes.jsonc b/inputfiles/addedTypes.jsonc index ad7a7458c..692b17c4f 100644 --- a/inputfiles/addedTypes.jsonc +++ b/inputfiles/addedTypes.jsonc @@ -657,16 +657,6 @@ ] } }, - "SVGStyleElement": { - "properties": { - "property": { - "disabled": { - "name": "disabled", - "type": "boolean" - } - } - } - }, "LinkError": { "name": "LinkError", "extends": "Error", diff --git a/inputfiles/mdn b/inputfiles/mdn index c148812e0..377c7d317 160000 --- a/inputfiles/mdn +++ b/inputfiles/mdn @@ -1 +1 @@ -Subproject commit c148812e0874220770cab62c16f33f48ceb98e99 +Subproject commit 377c7d317e7ffd477bc8b1273f0e215978b76dd1 diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 036bb65c0..c8b9ea19a 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -3305,12 +3305,6 @@ // The split was pushed by Mozilla and thus still has multiple supports for the direction. "properties": { "property": { - "cssFloat": { - // CSS Fonts Level 4 now puts this in CSSStyleProperties but only Safari supports it as of 2025-06 - // https://github.com/w3c/csswg-drafts/pull/9686 - "exposed": "Window", - "mdnUrl": "https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat" - }, "webkitLineClamp": { // The corresponding standardized property is not supported by anyone as of 2024-10. "deprecated": false diff --git a/inputfiles/patches/wasm.kdl b/inputfiles/patches/wasm.kdl new file mode 100644 index 000000000..d3cd544f1 --- /dev/null +++ b/inputfiles/patches/wasm.kdl @@ -0,0 +1 @@ +interface TagType legacyNamespace=WebAssembly diff --git a/package-lock.json b/package-lock.json index 2ad91452a..c7bbd4359 100644 --- a/package-lock.json +++ b/package-lock.json @@ -396,9 +396,9 @@ } }, "node_modules/@mdn/browser-compat-data": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-7.1.5.tgz", - "integrity": "sha512-j7XpHbvSU3GOtXawlGq6TIETj0wgcE9o7FXu88ragQE/ak8/OsqOxn+wZ2v/2QUe8vrVhb9OJes+gHgyGEOYEQ==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-7.1.7.tgz", + "integrity": "sha512-bpWZ7hidvjrwNWcMngZ8nTMTxn8WhnQntsGqEYgPr1vjy66kfwfDVizwXg6PvsgoANZ7nhuRBmvzjpCMk4ITDw==", "dev": true, "license": "CC0-1.0" }, @@ -1038,9 +1038,9 @@ } }, "node_modules/@webref/css": { - "version": "6.23.10", - "resolved": "https://registry.npmjs.org/@webref/css/-/css-6.23.10.tgz", - "integrity": "sha512-Z7QjoTKpoNEs2A3t+yKE8KB9YXwnSvJfDCux+Fkn1h5U2V3wSj5Xlc4j2AJ8k5E+Vrq8h9ZP3QHly29xnva6RQ==", + "version": "6.23.11", + "resolved": "https://registry.npmjs.org/@webref/css/-/css-6.23.11.tgz", + "integrity": "sha512-RyRWiSjmSyrs+n2Qv5SVg45fay8YF76PZ3YxDmF8HndC4K9D5NQuR2AfTeqspiwJdOsfTKBDAZD0vPw4Rxpu7g==", "dev": true, "license": "MIT", "peerDependencies": { @@ -1048,9 +1048,9 @@ } }, "node_modules/@webref/elements": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@webref/elements/-/elements-2.5.0.tgz", - "integrity": "sha512-8sOq8RgoQukYeuKi/lf1ioSrD2dla+0fnEWIr6PGp1Dc6sUHTL0AOc2LqcmAmjuICgaShSk6u72y0Uu4B5bF6Q==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@webref/elements/-/elements-2.5.1.tgz", + "integrity": "sha512-AGAuITJeKPAUAM4KqMh47KOl71Js8Nqs6IMUrS7KCbaQFrtBMRC6zAz/JbfZtcV+FaYqEXg3T0S343VEgXY/wQ==", "dev": true, "license": "MIT" }, @@ -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": { diff --git a/src/build/bcd/keep-alive.ts b/src/build/bcd/keep-alive.ts index 0df2bc72f..0cd0b8fb2 100644 --- a/src/build/bcd/keep-alive.ts +++ b/src/build/bcd/keep-alive.ts @@ -26,7 +26,6 @@ export const forceKeepAlive: Record = { IDBDatabase: [ // BCD unexpectedly is removing valid event data // https://github.com/mdn/browser-compat-data/issues/15345 - "onabort", "onerror", ], ShadowRoot: [ diff --git a/src/build/patches.ts b/src/build/patches.ts index f7e932847..b55583405 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -175,6 +175,11 @@ function handleMixinandInterfaces( "boolean", node.properties?.noInterfaceObject, ), + ...optionalMember( + "legacyNamespace", + "string", + node.properties?.legacyNamespace, + ), }; return { name,