Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 79 additions & 14 deletions baselines/audioworklet.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ interface EventListenerOptions {
capture?: boolean;
}

interface ExceptionOptions {
traceStack?: boolean;
}

interface MessageEventInit<T = any> extends EventInit {
data?: T;
lastEventId?: string;
Expand Down Expand Up @@ -178,6 +182,11 @@ interface UnderlyingSource<R = any> {
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.
*
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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: {
Expand All @@ -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.
*
Expand Down Expand Up @@ -1659,40 +1699,62 @@ 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: {
prototype: Table;
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<T extends ValueType = ValueType> {
mutable?: boolean;
value: T;
}

interface MemoryDescriptor {
initial: number;
maximum?: number;
address?: AddressType;
initial: AddressValue;
maximum?: AddressValue;
shared?: boolean;
}

Expand All @@ -1708,9 +1770,10 @@ declare namespace WebAssembly {
}

interface TableDescriptor {
address?: AddressType;
element: TableKind;
initial: number;
maximum?: number;
initial: AddressValue;
maximum?: AddressValue;
}

interface ValueTypeMap {
Expand All @@ -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<string, ExportValue>;
Expand All @@ -1737,12 +1800,12 @@ declare namespace WebAssembly {
type ModuleImports = Record<string, ImportValue>;
type ValueType = keyof ValueTypeMap;
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
function compile(bytes: BufferSource): Promise<Module>;
function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
/** [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). */
Expand Down Expand Up @@ -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<ArrayBufferLike>;
type BufferSource = ArrayBufferView<ArrayBuffer> | ArrayBuffer;
type DOMHighResTimeStamp = number;
Expand All @@ -1952,6 +2016,7 @@ type ReadableStreamController<T> = ReadableStreamDefaultController<T> | Readable
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
type Transferable = MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer;
type AddressType = "i32" | "i64";
type CompressionFormat = "deflate" | "deflate-raw" | "gzip";
type ReadableStreamReaderMode = "byob";
type ReadableStreamType = "bytes";
Loading