Skip to content
Open
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
43 changes: 24 additions & 19 deletions baselines/audioworklet.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ declare namespace WebAssembly {
*
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory)
*/
interface Memory<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
interface Memory<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike, TAddress extends AddressType = "i32"> {
/**
* The read-only **`buffer`** prototype property of the WebAssembly.Memory object returns the buffer contained in the memory. Depending on whether or not the memory was constructed with shared: true, the buffer is either an ArrayBuffer or a SharedArrayBuffer.
*
Expand All @@ -1672,15 +1672,15 @@ declare namespace WebAssembly {
*
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
*/
grow(delta: AddressValue): AddressValue;
grow(delta: AddressValueMap[TAddress]): AddressValueMap[TAddress];
toFixedLengthBuffer(): TArrayBuffer;
toResizableBuffer(): TArrayBuffer;
}

var Memory: {
prototype: Memory;
new(descriptor: MemoryDescriptor & { shared?: false }): Memory<ArrayBuffer>;
new(descriptor: MemoryDescriptor): Memory<ArrayBufferLike>;
new<TAddress extends AddressType = "i32">(descriptor: MemoryDescriptor<TAddress> & { shared?: false }): Memory<ArrayBuffer, TAddress>;
new<TAddress extends AddressType = "i32">(descriptor: MemoryDescriptor<TAddress>): Memory<ArrayBufferLike, TAddress>;
};

/**
Expand Down Expand Up @@ -1729,36 +1729,36 @@ declare namespace WebAssembly {
*
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table)
*/
interface Table {
interface Table<TAddress extends AddressType = "i32"> {
/**
* The read-only **`length`** prototype property of the WebAssembly.Table object returns the length of the table, i.e., the number of elements in the table.
*
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
*/
readonly length: AddressValue;
readonly length: AddressValueMap[TAddress];
/**
* 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: AddressValue): any;
get(index: AddressValueMap[TAddress]): 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: AddressValue, value?: any): AddressValue;
grow(delta: AddressValueMap[TAddress], value?: any): AddressValueMap[TAddress];
/**
* 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: AddressValue, value?: any): void;
set(index: AddressValueMap[TAddress], value?: any): void;
}

var Table: {
prototype: Table;
new(descriptor: TableDescriptor, value?: any): Table;
new<TAddress extends AddressType = "i32">(descriptor: TableDescriptor<TAddress>, value?: any): Table<TAddress>;
};

/**
Expand All @@ -1774,6 +1774,11 @@ declare namespace WebAssembly {
new(type: TagType): Tag;
};

interface AddressValueMap {
i32: number;
i64: bigint;
}

interface ExceptionOptions {
traceStack?: boolean;
}
Expand All @@ -1783,10 +1788,10 @@ declare namespace WebAssembly {
value: T;
}

interface MemoryDescriptor {
address?: AddressType;
initial: AddressValue;
maximum?: AddressValue;
interface MemoryDescriptor<TAddress extends AddressType = "i32"> {
address?: TAddress;
initial: AddressValueMap[TAddress];
maximum?: AddressValueMap[TAddress];
shared?: boolean;
}

Expand All @@ -1801,11 +1806,11 @@ declare namespace WebAssembly {
name: string;
}

interface TableDescriptor {
address?: AddressType;
interface TableDescriptor<TAddress extends AddressType = "i32"> {
address?: TAddress;
element: TableKind;
initial: AddressValue;
maximum?: AddressValue;
initial: AddressValueMap[TAddress];
maximum?: AddressValueMap[TAddress];
}

interface TagType {
Expand Down Expand Up @@ -1838,7 +1843,7 @@ declare namespace WebAssembly {
type AddressValue = number;
type ExportValue = Function | Global | Memory | Table;
type Exports = Record<string, ExportValue>;
type ImportValue = ExportValue | number;
type ImportValue = ExportValue | Memory<ArrayBufferLike, AddressType> | Table<AddressType> | number;
type Imports = Record<string, ModuleImports>;
type ModuleImports = Record<string, ImportValue>;
type ValueType = keyof ValueTypeMap;
Expand Down
43 changes: 24 additions & 19 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44096,7 +44096,7 @@ declare namespace WebAssembly {
*
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory)
*/
interface Memory<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
interface Memory<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike, TAddress extends AddressType = "i32"> {
/**
* The read-only **`buffer`** prototype property of the WebAssembly.Memory object returns the buffer contained in the memory. Depending on whether or not the memory was constructed with shared: true, the buffer is either an ArrayBuffer or a SharedArrayBuffer.
*
Expand All @@ -44108,15 +44108,15 @@ declare namespace WebAssembly {
*
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
*/
grow(delta: AddressValue): AddressValue;
grow(delta: AddressValueMap[TAddress]): AddressValueMap[TAddress];
toFixedLengthBuffer(): TArrayBuffer;
toResizableBuffer(): TArrayBuffer;
}

var Memory: {
prototype: Memory;
new(descriptor: MemoryDescriptor & { shared?: false }): Memory<ArrayBuffer>;
new(descriptor: MemoryDescriptor): Memory<ArrayBufferLike>;
new<TAddress extends AddressType = "i32">(descriptor: MemoryDescriptor<TAddress> & { shared?: false }): Memory<ArrayBuffer, TAddress>;
new<TAddress extends AddressType = "i32">(descriptor: MemoryDescriptor<TAddress>): Memory<ArrayBufferLike, TAddress>;
};

/**
Expand Down Expand Up @@ -44165,36 +44165,36 @@ declare namespace WebAssembly {
*
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table)
*/
interface Table {
interface Table<TAddress extends AddressType = "i32"> {
/**
* The read-only **`length`** prototype property of the WebAssembly.Table object returns the length of the table, i.e., the number of elements in the table.
*
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
*/
readonly length: AddressValue;
readonly length: AddressValueMap[TAddress];
/**
* 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: AddressValue): any;
get(index: AddressValueMap[TAddress]): 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: AddressValue, value?: any): AddressValue;
grow(delta: AddressValueMap[TAddress], value?: any): AddressValueMap[TAddress];
/**
* 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: AddressValue, value?: any): void;
set(index: AddressValueMap[TAddress], value?: any): void;
}

var Table: {
prototype: Table;
new(descriptor: TableDescriptor, value?: any): Table;
new<TAddress extends AddressType = "i32">(descriptor: TableDescriptor<TAddress>, value?: any): Table<TAddress>;
};

/**
Expand All @@ -44210,6 +44210,11 @@ declare namespace WebAssembly {
new(type: TagType): Tag;
};

interface AddressValueMap {
i32: number;
i64: bigint;
}

interface ExceptionOptions {
traceStack?: boolean;
}
Expand All @@ -44219,10 +44224,10 @@ declare namespace WebAssembly {
value: T;
}

interface MemoryDescriptor {
address?: AddressType;
initial: AddressValue;
maximum?: AddressValue;
interface MemoryDescriptor<TAddress extends AddressType = "i32"> {
address?: TAddress;
initial: AddressValueMap[TAddress];
maximum?: AddressValueMap[TAddress];
shared?: boolean;
}

Expand All @@ -44237,11 +44242,11 @@ declare namespace WebAssembly {
name: string;
}

interface TableDescriptor {
address?: AddressType;
interface TableDescriptor<TAddress extends AddressType = "i32"> {
address?: TAddress;
element: TableKind;
initial: AddressValue;
maximum?: AddressValue;
initial: AddressValueMap[TAddress];
maximum?: AddressValueMap[TAddress];
}

interface TagType {
Expand Down Expand Up @@ -44274,7 +44279,7 @@ declare namespace WebAssembly {
type AddressValue = number;
type ExportValue = Function | Global | Memory | Table;
type Exports = Record<string, ExportValue>;
type ImportValue = ExportValue | number;
type ImportValue = ExportValue | Memory<ArrayBufferLike, AddressType> | Table<AddressType> | number;
type Imports = Record<string, ModuleImports>;
type ModuleImports = Record<string, ImportValue>;
type ValueType = keyof ValueTypeMap;
Expand Down
43 changes: 24 additions & 19 deletions baselines/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13234,7 +13234,7 @@ declare namespace WebAssembly {
*
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory)
*/
interface Memory<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
interface Memory<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike, TAddress extends AddressType = "i32"> {
/**
* The read-only **`buffer`** prototype property of the WebAssembly.Memory object returns the buffer contained in the memory. Depending on whether or not the memory was constructed with shared: true, the buffer is either an ArrayBuffer or a SharedArrayBuffer.
*
Expand All @@ -13246,15 +13246,15 @@ declare namespace WebAssembly {
*
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
*/
grow(delta: AddressValue): AddressValue;
grow(delta: AddressValueMap[TAddress]): AddressValueMap[TAddress];
toFixedLengthBuffer(): TArrayBuffer;
toResizableBuffer(): TArrayBuffer;
}

var Memory: {
prototype: Memory;
new(descriptor: MemoryDescriptor & { shared?: false }): Memory<ArrayBuffer>;
new(descriptor: MemoryDescriptor): Memory<ArrayBufferLike>;
new<TAddress extends AddressType = "i32">(descriptor: MemoryDescriptor<TAddress> & { shared?: false }): Memory<ArrayBuffer, TAddress>;
new<TAddress extends AddressType = "i32">(descriptor: MemoryDescriptor<TAddress>): Memory<ArrayBufferLike, TAddress>;
};

/**
Expand Down Expand Up @@ -13303,36 +13303,36 @@ declare namespace WebAssembly {
*
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table)
*/
interface Table {
interface Table<TAddress extends AddressType = "i32"> {
/**
* The read-only **`length`** prototype property of the WebAssembly.Table object returns the length of the table, i.e., the number of elements in the table.
*
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
*/
readonly length: AddressValue;
readonly length: AddressValueMap[TAddress];
/**
* 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: AddressValue): any;
get(index: AddressValueMap[TAddress]): 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: AddressValue, value?: any): AddressValue;
grow(delta: AddressValueMap[TAddress], value?: any): AddressValueMap[TAddress];
/**
* 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: AddressValue, value?: any): void;
set(index: AddressValueMap[TAddress], value?: any): void;
}

var Table: {
prototype: Table;
new(descriptor: TableDescriptor, value?: any): Table;
new<TAddress extends AddressType = "i32">(descriptor: TableDescriptor<TAddress>, value?: any): Table<TAddress>;
};

/**
Expand All @@ -13348,6 +13348,11 @@ declare namespace WebAssembly {
new(type: TagType): Tag;
};

interface AddressValueMap {
i32: number;
i64: bigint;
}

interface ExceptionOptions {
traceStack?: boolean;
}
Expand All @@ -13357,10 +13362,10 @@ declare namespace WebAssembly {
value: T;
}

interface MemoryDescriptor {
address?: AddressType;
initial: AddressValue;
maximum?: AddressValue;
interface MemoryDescriptor<TAddress extends AddressType = "i32"> {
address?: TAddress;
initial: AddressValueMap[TAddress];
maximum?: AddressValueMap[TAddress];
shared?: boolean;
}

Expand All @@ -13375,11 +13380,11 @@ declare namespace WebAssembly {
name: string;
}

interface TableDescriptor {
address?: AddressType;
interface TableDescriptor<TAddress extends AddressType = "i32"> {
address?: TAddress;
element: TableKind;
initial: AddressValue;
maximum?: AddressValue;
initial: AddressValueMap[TAddress];
maximum?: AddressValueMap[TAddress];
}

interface TagType {
Expand Down Expand Up @@ -13412,7 +13417,7 @@ declare namespace WebAssembly {
type AddressValue = number;
type ExportValue = Function | Global | Memory | Table;
type Exports = Record<string, ExportValue>;
type ImportValue = ExportValue | number;
type ImportValue = ExportValue | Memory<ArrayBufferLike, AddressType> | Table<AddressType> | number;
type Imports = Record<string, ModuleImports>;
type ModuleImports = Record<string, ImportValue>;
type ValueType = keyof ValueTypeMap;
Expand Down
Loading