@types/serviceworker 0.0.157 → 0.0.159

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -28,4 +28,4 @@ This project does not respect semantic versioning as almost every change could p
28
28
 
29
29
  ## Deploy Metadata
30
30
 
31
- You can read what changed in version 0.0.157 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.157.
31
+ You can read what changed in version 0.0.159 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.159.
package/index.d.ts CHANGED
@@ -534,6 +534,10 @@ interface QueuingStrategyInit {
534
534
  highWaterMark: number;
535
535
  }
536
536
 
537
+ interface ReadableStreamBYOBReaderReadOptions {
538
+ min?: number;
539
+ }
540
+
537
541
  interface ReadableStreamGetReaderOptions {
538
542
  /**
539
543
  * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
@@ -6247,6 +6251,12 @@ declare var PushManager: {
6247
6251
  readonly supportedContentEncodings: ReadonlyArray<string>;
6248
6252
  };
6249
6253
 
6254
+ /** Available only in secure contexts. */
6255
+ interface PushManagerAttribute {
6256
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
6257
+ readonly pushManager: PushManager;
6258
+ }
6259
+
6250
6260
  /**
6251
6261
  * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats.
6252
6262
  * Available only in secure contexts.
@@ -6485,7 +6495,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
6485
6495
  *
6486
6496
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
6487
6497
  */
6488
- read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
6498
+ read<T extends ArrayBufferView>(view: T, options?: ReadableStreamBYOBReaderReadOptions): Promise<ReadableStreamReadResult<T>>;
6489
6499
  /**
6490
6500
  * The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
6491
6501
  *
@@ -7116,7 +7126,7 @@ interface ServiceWorkerRegistrationEventMap {
7116
7126
  *
7117
7127
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
7118
7128
  */
7119
- interface ServiceWorkerRegistration extends EventTarget {
7129
+ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
7120
7130
  /**
7121
7131
  * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`.
7122
7132
  *
@@ -7143,12 +7153,6 @@ interface ServiceWorkerRegistration extends EventTarget {
7143
7153
  readonly navigationPreload: NavigationPreloadManager;
7144
7154
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
7145
7155
  onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
7146
- /**
7147
- * 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.
7148
- *
7149
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager)
7150
- */
7151
- readonly pushManager: PushManager;
7152
7156
  /**
7153
7157
  * 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.
7154
7158
  *
@@ -11055,6 +11059,37 @@ declare namespace WebAssembly {
11055
11059
  (message?: string): CompileError;
11056
11060
  };
11057
11061
 
11062
+ /**
11063
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
11064
+ *
11065
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
11066
+ */
11067
+ interface Exception {
11068
+ /**
11069
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
11070
+ *
11071
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
11072
+ */
11073
+ readonly stack: string | undefined;
11074
+ /**
11075
+ * 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.
11076
+ *
11077
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
11078
+ */
11079
+ getArg(index: number): any;
11080
+ /**
11081
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
11082
+ *
11083
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
11084
+ */
11085
+ is(exceptionTag: Tag): boolean;
11086
+ }
11087
+
11088
+ var Exception: {
11089
+ prototype: Exception;
11090
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
11091
+ };
11092
+
11058
11093
  /**
11059
11094
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
11060
11095
  *
@@ -11115,7 +11150,7 @@ declare namespace WebAssembly {
11115
11150
  *
11116
11151
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
11117
11152
  */
11118
- grow(delta: number): number;
11153
+ grow(delta: AddressValue): AddressValue;
11119
11154
  }
11120
11155
 
11121
11156
  var Memory: {
@@ -11133,7 +11168,7 @@ declare namespace WebAssembly {
11133
11168
 
11134
11169
  var Module: {
11135
11170
  prototype: Module;
11136
- new(bytes: BufferSource): Module;
11171
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
11137
11172
  /**
11138
11173
  * 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.
11139
11174
  *
@@ -11174,25 +11209,25 @@ declare namespace WebAssembly {
11174
11209
  *
11175
11210
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
11176
11211
  */
11177
- readonly length: number;
11212
+ readonly length: AddressValue;
11178
11213
  /**
11179
11214
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
11180
11215
  *
11181
11216
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
11182
11217
  */
11183
- get(index: number): any;
11218
+ get(index: AddressValue): any;
11184
11219
  /**
11185
11220
  * 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.
11186
11221
  *
11187
11222
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
11188
11223
  */
11189
- grow(delta: number, value?: any): number;
11224
+ grow(delta: AddressValue, value?: any): AddressValue;
11190
11225
  /**
11191
11226
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
11192
11227
  *
11193
11228
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
11194
11229
  */
11195
- set(index: number, value?: any): void;
11230
+ set(index: AddressValue, value?: any): void;
11196
11231
  }
11197
11232
 
11198
11233
  var Table: {
@@ -11200,14 +11235,32 @@ declare namespace WebAssembly {
11200
11235
  new(descriptor: TableDescriptor, value?: any): Table;
11201
11236
  };
11202
11237
 
11238
+ /**
11239
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
11240
+ *
11241
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
11242
+ */
11243
+ interface Tag {
11244
+ }
11245
+
11246
+ var Tag: {
11247
+ prototype: Tag;
11248
+ new(type: TagType): Tag;
11249
+ };
11250
+
11251
+ interface ExceptionOptions {
11252
+ traceStack?: boolean;
11253
+ }
11254
+
11203
11255
  interface GlobalDescriptor<T extends ValueType = ValueType> {
11204
11256
  mutable?: boolean;
11205
11257
  value: T;
11206
11258
  }
11207
11259
 
11208
11260
  interface MemoryDescriptor {
11209
- initial: number;
11210
- maximum?: number;
11261
+ address?: AddressType;
11262
+ initial: AddressValue;
11263
+ maximum?: AddressValue;
11211
11264
  shared?: boolean;
11212
11265
  }
11213
11266
 
@@ -11223,9 +11276,14 @@ declare namespace WebAssembly {
11223
11276
  }
11224
11277
 
11225
11278
  interface TableDescriptor {
11279
+ address?: AddressType;
11226
11280
  element: TableKind;
11227
- initial: number;
11228
- maximum?: number;
11281
+ initial: AddressValue;
11282
+ maximum?: AddressValue;
11283
+ }
11284
+
11285
+ interface TagType {
11286
+ parameters: ValueType[];
11229
11287
  }
11230
11288
 
11231
11289
  interface ValueTypeMap {
@@ -11238,30 +11296,38 @@ declare namespace WebAssembly {
11238
11296
  v128: never;
11239
11297
  }
11240
11298
 
11299
+ interface WebAssemblyCompileOptions {
11300
+ builtins?: string[];
11301
+ importedStringConstants?: string | null;
11302
+ }
11303
+
11241
11304
  interface WebAssemblyInstantiatedSource {
11242
11305
  instance: Instance;
11243
11306
  module: Module;
11244
11307
  }
11245
11308
 
11246
- type ImportExportKind = "function" | "global" | "memory" | "table";
11309
+ type AddressType = "i32" | "i64";
11310
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
11247
11311
  type TableKind = "anyfunc" | "externref";
11312
+ type AddressValue = number;
11248
11313
  type ExportValue = Function | Global | Memory | Table;
11249
11314
  type Exports = Record<string, ExportValue>;
11250
11315
  type ImportValue = ExportValue | number;
11251
11316
  type Imports = Record<string, ModuleImports>;
11252
11317
  type ModuleImports = Record<string, ImportValue>;
11253
11318
  type ValueType = keyof ValueTypeMap;
11319
+ var JSTag: Tag;
11254
11320
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
11255
- function compile(bytes: BufferSource): Promise<Module>;
11321
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
11256
11322
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
11257
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
11323
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
11258
11324
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
11259
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11325
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
11260
11326
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
11261
11327
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
11262
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11328
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
11263
11329
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
11264
- function validate(bytes: BufferSource): boolean;
11330
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
11265
11331
  }
11266
11332
 
11267
11333
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/serviceworker",
3
- "version": "0.0.157",
3
+ "version": "0.0.159",
4
4
  "description": "Types for the global scope of Service Workers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -531,6 +531,10 @@ interface QueuingStrategyInit {
531
531
  highWaterMark: number;
532
532
  }
533
533
 
534
+ interface ReadableStreamBYOBReaderReadOptions {
535
+ min?: number;
536
+ }
537
+
534
538
  interface ReadableStreamGetReaderOptions {
535
539
  /**
536
540
  * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
@@ -6244,6 +6248,12 @@ declare var PushManager: {
6244
6248
  readonly supportedContentEncodings: ReadonlyArray<string>;
6245
6249
  };
6246
6250
 
6251
+ /** Available only in secure contexts. */
6252
+ interface PushManagerAttribute {
6253
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
6254
+ readonly pushManager: PushManager;
6255
+ }
6256
+
6247
6257
  /**
6248
6258
  * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats.
6249
6259
  * Available only in secure contexts.
@@ -6482,7 +6492,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
6482
6492
  *
6483
6493
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
6484
6494
  */
6485
- read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
6495
+ read<T extends ArrayBufferView>(view: T, options?: ReadableStreamBYOBReaderReadOptions): Promise<ReadableStreamReadResult<T>>;
6486
6496
  /**
6487
6497
  * The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
6488
6498
  *
@@ -7113,7 +7123,7 @@ interface ServiceWorkerRegistrationEventMap {
7113
7123
  *
7114
7124
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
7115
7125
  */
7116
- interface ServiceWorkerRegistration extends EventTarget {
7126
+ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
7117
7127
  /**
7118
7128
  * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`.
7119
7129
  *
@@ -7140,12 +7150,6 @@ interface ServiceWorkerRegistration extends EventTarget {
7140
7150
  readonly navigationPreload: NavigationPreloadManager;
7141
7151
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
7142
7152
  onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
7143
- /**
7144
- * 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.
7145
- *
7146
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager)
7147
- */
7148
- readonly pushManager: PushManager;
7149
7153
  /**
7150
7154
  * 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.
7151
7155
  *
@@ -11052,6 +11056,37 @@ declare namespace WebAssembly {
11052
11056
  (message?: string): CompileError;
11053
11057
  };
11054
11058
 
11059
+ /**
11060
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
11061
+ *
11062
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
11063
+ */
11064
+ interface Exception {
11065
+ /**
11066
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
11067
+ *
11068
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
11069
+ */
11070
+ readonly stack: string | undefined;
11071
+ /**
11072
+ * 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.
11073
+ *
11074
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
11075
+ */
11076
+ getArg(index: number): any;
11077
+ /**
11078
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
11079
+ *
11080
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
11081
+ */
11082
+ is(exceptionTag: Tag): boolean;
11083
+ }
11084
+
11085
+ var Exception: {
11086
+ prototype: Exception;
11087
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
11088
+ };
11089
+
11055
11090
  /**
11056
11091
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
11057
11092
  *
@@ -11112,7 +11147,7 @@ declare namespace WebAssembly {
11112
11147
  *
11113
11148
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
11114
11149
  */
11115
- grow(delta: number): number;
11150
+ grow(delta: AddressValue): AddressValue;
11116
11151
  }
11117
11152
 
11118
11153
  var Memory: {
@@ -11130,7 +11165,7 @@ declare namespace WebAssembly {
11130
11165
 
11131
11166
  var Module: {
11132
11167
  prototype: Module;
11133
- new(bytes: BufferSource): Module;
11168
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
11134
11169
  /**
11135
11170
  * 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.
11136
11171
  *
@@ -11171,25 +11206,25 @@ declare namespace WebAssembly {
11171
11206
  *
11172
11207
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
11173
11208
  */
11174
- readonly length: number;
11209
+ readonly length: AddressValue;
11175
11210
  /**
11176
11211
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
11177
11212
  *
11178
11213
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
11179
11214
  */
11180
- get(index: number): any;
11215
+ get(index: AddressValue): any;
11181
11216
  /**
11182
11217
  * 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.
11183
11218
  *
11184
11219
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
11185
11220
  */
11186
- grow(delta: number, value?: any): number;
11221
+ grow(delta: AddressValue, value?: any): AddressValue;
11187
11222
  /**
11188
11223
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
11189
11224
  *
11190
11225
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
11191
11226
  */
11192
- set(index: number, value?: any): void;
11227
+ set(index: AddressValue, value?: any): void;
11193
11228
  }
11194
11229
 
11195
11230
  var Table: {
@@ -11197,14 +11232,32 @@ declare namespace WebAssembly {
11197
11232
  new(descriptor: TableDescriptor, value?: any): Table;
11198
11233
  };
11199
11234
 
11235
+ /**
11236
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
11237
+ *
11238
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
11239
+ */
11240
+ interface Tag {
11241
+ }
11242
+
11243
+ var Tag: {
11244
+ prototype: Tag;
11245
+ new(type: TagType): Tag;
11246
+ };
11247
+
11248
+ interface ExceptionOptions {
11249
+ traceStack?: boolean;
11250
+ }
11251
+
11200
11252
  interface GlobalDescriptor<T extends ValueType = ValueType> {
11201
11253
  mutable?: boolean;
11202
11254
  value: T;
11203
11255
  }
11204
11256
 
11205
11257
  interface MemoryDescriptor {
11206
- initial: number;
11207
- maximum?: number;
11258
+ address?: AddressType;
11259
+ initial: AddressValue;
11260
+ maximum?: AddressValue;
11208
11261
  shared?: boolean;
11209
11262
  }
11210
11263
 
@@ -11220,9 +11273,14 @@ declare namespace WebAssembly {
11220
11273
  }
11221
11274
 
11222
11275
  interface TableDescriptor {
11276
+ address?: AddressType;
11223
11277
  element: TableKind;
11224
- initial: number;
11225
- maximum?: number;
11278
+ initial: AddressValue;
11279
+ maximum?: AddressValue;
11280
+ }
11281
+
11282
+ interface TagType {
11283
+ parameters: ValueType[];
11226
11284
  }
11227
11285
 
11228
11286
  interface ValueTypeMap {
@@ -11235,30 +11293,38 @@ declare namespace WebAssembly {
11235
11293
  v128: never;
11236
11294
  }
11237
11295
 
11296
+ interface WebAssemblyCompileOptions {
11297
+ builtins?: string[];
11298
+ importedStringConstants?: string | null;
11299
+ }
11300
+
11238
11301
  interface WebAssemblyInstantiatedSource {
11239
11302
  instance: Instance;
11240
11303
  module: Module;
11241
11304
  }
11242
11305
 
11243
- type ImportExportKind = "function" | "global" | "memory" | "table";
11306
+ type AddressType = "i32" | "i64";
11307
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
11244
11308
  type TableKind = "anyfunc" | "externref";
11309
+ type AddressValue = number;
11245
11310
  type ExportValue = Function | Global | Memory | Table;
11246
11311
  type Exports = Record<string, ExportValue>;
11247
11312
  type ImportValue = ExportValue | number;
11248
11313
  type Imports = Record<string, ModuleImports>;
11249
11314
  type ModuleImports = Record<string, ImportValue>;
11250
11315
  type ValueType = keyof ValueTypeMap;
11316
+ var JSTag: Tag;
11251
11317
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
11252
- function compile(bytes: BufferSource): Promise<Module>;
11318
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
11253
11319
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
11254
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
11320
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
11255
11321
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
11256
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11322
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
11257
11323
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
11258
11324
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
11259
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11325
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
11260
11326
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
11261
- function validate(bytes: BufferSource): boolean;
11327
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
11262
11328
  }
11263
11329
 
11264
11330
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
package/ts5.6/index.d.ts CHANGED
@@ -531,6 +531,10 @@ interface QueuingStrategyInit {
531
531
  highWaterMark: number;
532
532
  }
533
533
 
534
+ interface ReadableStreamBYOBReaderReadOptions {
535
+ min?: number;
536
+ }
537
+
534
538
  interface ReadableStreamGetReaderOptions {
535
539
  /**
536
540
  * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
@@ -6244,6 +6248,12 @@ declare var PushManager: {
6244
6248
  readonly supportedContentEncodings: ReadonlyArray<string>;
6245
6249
  };
6246
6250
 
6251
+ /** Available only in secure contexts. */
6252
+ interface PushManagerAttribute {
6253
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
6254
+ readonly pushManager: PushManager;
6255
+ }
6256
+
6247
6257
  /**
6248
6258
  * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats.
6249
6259
  * Available only in secure contexts.
@@ -6482,7 +6492,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
6482
6492
  *
6483
6493
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
6484
6494
  */
6485
- read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
6495
+ read<T extends ArrayBufferView>(view: T, options?: ReadableStreamBYOBReaderReadOptions): Promise<ReadableStreamReadResult<T>>;
6486
6496
  /**
6487
6497
  * The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
6488
6498
  *
@@ -7113,7 +7123,7 @@ interface ServiceWorkerRegistrationEventMap {
7113
7123
  *
7114
7124
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
7115
7125
  */
7116
- interface ServiceWorkerRegistration extends EventTarget {
7126
+ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
7117
7127
  /**
7118
7128
  * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`.
7119
7129
  *
@@ -7140,12 +7150,6 @@ interface ServiceWorkerRegistration extends EventTarget {
7140
7150
  readonly navigationPreload: NavigationPreloadManager;
7141
7151
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
7142
7152
  onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
7143
- /**
7144
- * 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.
7145
- *
7146
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager)
7147
- */
7148
- readonly pushManager: PushManager;
7149
7153
  /**
7150
7154
  * 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.
7151
7155
  *
@@ -11052,6 +11056,37 @@ declare namespace WebAssembly {
11052
11056
  (message?: string): CompileError;
11053
11057
  };
11054
11058
 
11059
+ /**
11060
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
11061
+ *
11062
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
11063
+ */
11064
+ interface Exception {
11065
+ /**
11066
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
11067
+ *
11068
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
11069
+ */
11070
+ readonly stack: string | undefined;
11071
+ /**
11072
+ * 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.
11073
+ *
11074
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
11075
+ */
11076
+ getArg(index: number): any;
11077
+ /**
11078
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
11079
+ *
11080
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
11081
+ */
11082
+ is(exceptionTag: Tag): boolean;
11083
+ }
11084
+
11085
+ var Exception: {
11086
+ prototype: Exception;
11087
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
11088
+ };
11089
+
11055
11090
  /**
11056
11091
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
11057
11092
  *
@@ -11112,7 +11147,7 @@ declare namespace WebAssembly {
11112
11147
  *
11113
11148
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
11114
11149
  */
11115
- grow(delta: number): number;
11150
+ grow(delta: AddressValue): AddressValue;
11116
11151
  }
11117
11152
 
11118
11153
  var Memory: {
@@ -11130,7 +11165,7 @@ declare namespace WebAssembly {
11130
11165
 
11131
11166
  var Module: {
11132
11167
  prototype: Module;
11133
- new(bytes: BufferSource): Module;
11168
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
11134
11169
  /**
11135
11170
  * 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.
11136
11171
  *
@@ -11171,25 +11206,25 @@ declare namespace WebAssembly {
11171
11206
  *
11172
11207
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
11173
11208
  */
11174
- readonly length: number;
11209
+ readonly length: AddressValue;
11175
11210
  /**
11176
11211
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
11177
11212
  *
11178
11213
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
11179
11214
  */
11180
- get(index: number): any;
11215
+ get(index: AddressValue): any;
11181
11216
  /**
11182
11217
  * 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.
11183
11218
  *
11184
11219
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
11185
11220
  */
11186
- grow(delta: number, value?: any): number;
11221
+ grow(delta: AddressValue, value?: any): AddressValue;
11187
11222
  /**
11188
11223
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
11189
11224
  *
11190
11225
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
11191
11226
  */
11192
- set(index: number, value?: any): void;
11227
+ set(index: AddressValue, value?: any): void;
11193
11228
  }
11194
11229
 
11195
11230
  var Table: {
@@ -11197,14 +11232,32 @@ declare namespace WebAssembly {
11197
11232
  new(descriptor: TableDescriptor, value?: any): Table;
11198
11233
  };
11199
11234
 
11235
+ /**
11236
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
11237
+ *
11238
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
11239
+ */
11240
+ interface Tag {
11241
+ }
11242
+
11243
+ var Tag: {
11244
+ prototype: Tag;
11245
+ new(type: TagType): Tag;
11246
+ };
11247
+
11248
+ interface ExceptionOptions {
11249
+ traceStack?: boolean;
11250
+ }
11251
+
11200
11252
  interface GlobalDescriptor<T extends ValueType = ValueType> {
11201
11253
  mutable?: boolean;
11202
11254
  value: T;
11203
11255
  }
11204
11256
 
11205
11257
  interface MemoryDescriptor {
11206
- initial: number;
11207
- maximum?: number;
11258
+ address?: AddressType;
11259
+ initial: AddressValue;
11260
+ maximum?: AddressValue;
11208
11261
  shared?: boolean;
11209
11262
  }
11210
11263
 
@@ -11220,9 +11273,14 @@ declare namespace WebAssembly {
11220
11273
  }
11221
11274
 
11222
11275
  interface TableDescriptor {
11276
+ address?: AddressType;
11223
11277
  element: TableKind;
11224
- initial: number;
11225
- maximum?: number;
11278
+ initial: AddressValue;
11279
+ maximum?: AddressValue;
11280
+ }
11281
+
11282
+ interface TagType {
11283
+ parameters: ValueType[];
11226
11284
  }
11227
11285
 
11228
11286
  interface ValueTypeMap {
@@ -11235,30 +11293,38 @@ declare namespace WebAssembly {
11235
11293
  v128: never;
11236
11294
  }
11237
11295
 
11296
+ interface WebAssemblyCompileOptions {
11297
+ builtins?: string[];
11298
+ importedStringConstants?: string | null;
11299
+ }
11300
+
11238
11301
  interface WebAssemblyInstantiatedSource {
11239
11302
  instance: Instance;
11240
11303
  module: Module;
11241
11304
  }
11242
11305
 
11243
- type ImportExportKind = "function" | "global" | "memory" | "table";
11306
+ type AddressType = "i32" | "i64";
11307
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
11244
11308
  type TableKind = "anyfunc" | "externref";
11309
+ type AddressValue = number;
11245
11310
  type ExportValue = Function | Global | Memory | Table;
11246
11311
  type Exports = Record<string, ExportValue>;
11247
11312
  type ImportValue = ExportValue | number;
11248
11313
  type Imports = Record<string, ModuleImports>;
11249
11314
  type ModuleImports = Record<string, ImportValue>;
11250
11315
  type ValueType = keyof ValueTypeMap;
11316
+ var JSTag: Tag;
11251
11317
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
11252
- function compile(bytes: BufferSource): Promise<Module>;
11318
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
11253
11319
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
11254
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
11320
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
11255
11321
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
11256
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11322
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
11257
11323
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
11258
11324
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
11259
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11325
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
11260
11326
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
11261
- function validate(bytes: BufferSource): boolean;
11327
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
11262
11328
  }
11263
11329
 
11264
11330
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
package/ts5.9/index.d.ts CHANGED
@@ -531,6 +531,10 @@ interface QueuingStrategyInit {
531
531
  highWaterMark: number;
532
532
  }
533
533
 
534
+ interface ReadableStreamBYOBReaderReadOptions {
535
+ min?: number;
536
+ }
537
+
534
538
  interface ReadableStreamGetReaderOptions {
535
539
  /**
536
540
  * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
@@ -6244,6 +6248,12 @@ declare var PushManager: {
6244
6248
  readonly supportedContentEncodings: ReadonlyArray<string>;
6245
6249
  };
6246
6250
 
6251
+ /** Available only in secure contexts. */
6252
+ interface PushManagerAttribute {
6253
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
6254
+ readonly pushManager: PushManager;
6255
+ }
6256
+
6247
6257
  /**
6248
6258
  * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats.
6249
6259
  * Available only in secure contexts.
@@ -6482,7 +6492,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
6482
6492
  *
6483
6493
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
6484
6494
  */
6485
- read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
6495
+ read<T extends ArrayBufferView>(view: T, options?: ReadableStreamBYOBReaderReadOptions): Promise<ReadableStreamReadResult<T>>;
6486
6496
  /**
6487
6497
  * The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
6488
6498
  *
@@ -7113,7 +7123,7 @@ interface ServiceWorkerRegistrationEventMap {
7113
7123
  *
7114
7124
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
7115
7125
  */
7116
- interface ServiceWorkerRegistration extends EventTarget {
7126
+ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
7117
7127
  /**
7118
7128
  * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`.
7119
7129
  *
@@ -7140,12 +7150,6 @@ interface ServiceWorkerRegistration extends EventTarget {
7140
7150
  readonly navigationPreload: NavigationPreloadManager;
7141
7151
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
7142
7152
  onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
7143
- /**
7144
- * 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.
7145
- *
7146
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager)
7147
- */
7148
- readonly pushManager: PushManager;
7149
7153
  /**
7150
7154
  * 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.
7151
7155
  *
@@ -11052,6 +11056,37 @@ declare namespace WebAssembly {
11052
11056
  (message?: string): CompileError;
11053
11057
  };
11054
11058
 
11059
+ /**
11060
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
11061
+ *
11062
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
11063
+ */
11064
+ interface Exception {
11065
+ /**
11066
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
11067
+ *
11068
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
11069
+ */
11070
+ readonly stack: string | undefined;
11071
+ /**
11072
+ * 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.
11073
+ *
11074
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
11075
+ */
11076
+ getArg(index: number): any;
11077
+ /**
11078
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
11079
+ *
11080
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
11081
+ */
11082
+ is(exceptionTag: Tag): boolean;
11083
+ }
11084
+
11085
+ var Exception: {
11086
+ prototype: Exception;
11087
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
11088
+ };
11089
+
11055
11090
  /**
11056
11091
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
11057
11092
  *
@@ -11112,7 +11147,7 @@ declare namespace WebAssembly {
11112
11147
  *
11113
11148
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
11114
11149
  */
11115
- grow(delta: number): number;
11150
+ grow(delta: AddressValue): AddressValue;
11116
11151
  }
11117
11152
 
11118
11153
  var Memory: {
@@ -11130,7 +11165,7 @@ declare namespace WebAssembly {
11130
11165
 
11131
11166
  var Module: {
11132
11167
  prototype: Module;
11133
- new(bytes: BufferSource): Module;
11168
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
11134
11169
  /**
11135
11170
  * 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.
11136
11171
  *
@@ -11171,25 +11206,25 @@ declare namespace WebAssembly {
11171
11206
  *
11172
11207
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
11173
11208
  */
11174
- readonly length: number;
11209
+ readonly length: AddressValue;
11175
11210
  /**
11176
11211
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
11177
11212
  *
11178
11213
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
11179
11214
  */
11180
- get(index: number): any;
11215
+ get(index: AddressValue): any;
11181
11216
  /**
11182
11217
  * 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.
11183
11218
  *
11184
11219
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
11185
11220
  */
11186
- grow(delta: number, value?: any): number;
11221
+ grow(delta: AddressValue, value?: any): AddressValue;
11187
11222
  /**
11188
11223
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
11189
11224
  *
11190
11225
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
11191
11226
  */
11192
- set(index: number, value?: any): void;
11227
+ set(index: AddressValue, value?: any): void;
11193
11228
  }
11194
11229
 
11195
11230
  var Table: {
@@ -11197,14 +11232,32 @@ declare namespace WebAssembly {
11197
11232
  new(descriptor: TableDescriptor, value?: any): Table;
11198
11233
  };
11199
11234
 
11235
+ /**
11236
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
11237
+ *
11238
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
11239
+ */
11240
+ interface Tag {
11241
+ }
11242
+
11243
+ var Tag: {
11244
+ prototype: Tag;
11245
+ new(type: TagType): Tag;
11246
+ };
11247
+
11248
+ interface ExceptionOptions {
11249
+ traceStack?: boolean;
11250
+ }
11251
+
11200
11252
  interface GlobalDescriptor<T extends ValueType = ValueType> {
11201
11253
  mutable?: boolean;
11202
11254
  value: T;
11203
11255
  }
11204
11256
 
11205
11257
  interface MemoryDescriptor {
11206
- initial: number;
11207
- maximum?: number;
11258
+ address?: AddressType;
11259
+ initial: AddressValue;
11260
+ maximum?: AddressValue;
11208
11261
  shared?: boolean;
11209
11262
  }
11210
11263
 
@@ -11220,9 +11273,14 @@ declare namespace WebAssembly {
11220
11273
  }
11221
11274
 
11222
11275
  interface TableDescriptor {
11276
+ address?: AddressType;
11223
11277
  element: TableKind;
11224
- initial: number;
11225
- maximum?: number;
11278
+ initial: AddressValue;
11279
+ maximum?: AddressValue;
11280
+ }
11281
+
11282
+ interface TagType {
11283
+ parameters: ValueType[];
11226
11284
  }
11227
11285
 
11228
11286
  interface ValueTypeMap {
@@ -11235,30 +11293,38 @@ declare namespace WebAssembly {
11235
11293
  v128: never;
11236
11294
  }
11237
11295
 
11296
+ interface WebAssemblyCompileOptions {
11297
+ builtins?: string[];
11298
+ importedStringConstants?: string | null;
11299
+ }
11300
+
11238
11301
  interface WebAssemblyInstantiatedSource {
11239
11302
  instance: Instance;
11240
11303
  module: Module;
11241
11304
  }
11242
11305
 
11243
- type ImportExportKind = "function" | "global" | "memory" | "table";
11306
+ type AddressType = "i32" | "i64";
11307
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
11244
11308
  type TableKind = "anyfunc" | "externref";
11309
+ type AddressValue = number;
11245
11310
  type ExportValue = Function | Global | Memory | Table;
11246
11311
  type Exports = Record<string, ExportValue>;
11247
11312
  type ImportValue = ExportValue | number;
11248
11313
  type Imports = Record<string, ModuleImports>;
11249
11314
  type ModuleImports = Record<string, ImportValue>;
11250
11315
  type ValueType = keyof ValueTypeMap;
11316
+ var JSTag: Tag;
11251
11317
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
11252
- function compile(bytes: BufferSource): Promise<Module>;
11318
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
11253
11319
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
11254
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
11320
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
11255
11321
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
11256
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11322
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
11257
11323
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
11258
11324
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
11259
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11325
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
11260
11326
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
11261
- function validate(bytes: BufferSource): boolean;
11327
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
11262
11328
  }
11263
11329
 
11264
11330
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */