@types/webworker 0.0.33 → 0.0.35

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
@@ -45,4 +45,4 @@ This project does not respect semantic versioning as almost every change could p
45
45
 
46
46
  ## Deploy Metadata
47
47
 
48
- You can read what changed in version 0.0.33 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.33.
48
+ You can read what changed in version 0.0.35 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.35.
package/index.d.ts CHANGED
@@ -678,6 +678,10 @@ interface RTCEncodedVideoFrameMetadata extends RTCEncodedFrameMetadata {
678
678
  width?: number;
679
679
  }
680
680
 
681
+ interface ReadableStreamBYOBReaderReadOptions {
682
+ min?: number;
683
+ }
684
+
681
685
  interface ReadableStreamGetReaderOptions {
682
686
  /**
683
687
  * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
@@ -7108,6 +7112,12 @@ declare var PushManager: {
7108
7112
  readonly supportedContentEncodings: ReadonlyArray<string>;
7109
7113
  };
7110
7114
 
7115
+ /** Available only in secure contexts. */
7116
+ interface PushManagerAttribute {
7117
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
7118
+ readonly pushManager: PushManager;
7119
+ }
7120
+
7111
7121
  /**
7112
7122
  * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats.
7113
7123
  * Available only in secure contexts.
@@ -7587,7 +7597,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
7587
7597
  *
7588
7598
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
7589
7599
  */
7590
- read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
7600
+ read<T extends ArrayBufferView>(view: T, options?: ReadableStreamBYOBReaderReadOptions): Promise<ReadableStreamReadResult<T>>;
7591
7601
  /**
7592
7602
  * The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
7593
7603
  *
@@ -8218,7 +8228,7 @@ interface ServiceWorkerRegistrationEventMap {
8218
8228
  *
8219
8229
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
8220
8230
  */
8221
- interface ServiceWorkerRegistration extends EventTarget {
8231
+ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
8222
8232
  /**
8223
8233
  * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`.
8224
8234
  *
@@ -8245,12 +8255,6 @@ interface ServiceWorkerRegistration extends EventTarget {
8245
8255
  readonly navigationPreload: NavigationPreloadManager;
8246
8256
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
8247
8257
  onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
8248
- /**
8249
- * 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.
8250
- *
8251
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager)
8252
- */
8253
- readonly pushManager: PushManager;
8254
8258
  /**
8255
8259
  * 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.
8256
8260
  *
@@ -12709,6 +12713,37 @@ declare namespace WebAssembly {
12709
12713
  (message?: string): CompileError;
12710
12714
  };
12711
12715
 
12716
+ /**
12717
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
12718
+ *
12719
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
12720
+ */
12721
+ interface Exception {
12722
+ /**
12723
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
12724
+ *
12725
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
12726
+ */
12727
+ readonly stack: string | undefined;
12728
+ /**
12729
+ * 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.
12730
+ *
12731
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
12732
+ */
12733
+ getArg(index: number): any;
12734
+ /**
12735
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
12736
+ *
12737
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
12738
+ */
12739
+ is(exceptionTag: Tag): boolean;
12740
+ }
12741
+
12742
+ var Exception: {
12743
+ prototype: Exception;
12744
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
12745
+ };
12746
+
12712
12747
  /**
12713
12748
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
12714
12749
  *
@@ -12769,7 +12804,7 @@ declare namespace WebAssembly {
12769
12804
  *
12770
12805
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
12771
12806
  */
12772
- grow(delta: number): number;
12807
+ grow(delta: AddressValue): AddressValue;
12773
12808
  }
12774
12809
 
12775
12810
  var Memory: {
@@ -12787,7 +12822,7 @@ declare namespace WebAssembly {
12787
12822
 
12788
12823
  var Module: {
12789
12824
  prototype: Module;
12790
- new(bytes: BufferSource): Module;
12825
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
12791
12826
  /**
12792
12827
  * 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.
12793
12828
  *
@@ -12828,25 +12863,25 @@ declare namespace WebAssembly {
12828
12863
  *
12829
12864
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
12830
12865
  */
12831
- readonly length: number;
12866
+ readonly length: AddressValue;
12832
12867
  /**
12833
12868
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
12834
12869
  *
12835
12870
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
12836
12871
  */
12837
- get(index: number): any;
12872
+ get(index: AddressValue): any;
12838
12873
  /**
12839
12874
  * 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.
12840
12875
  *
12841
12876
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
12842
12877
  */
12843
- grow(delta: number, value?: any): number;
12878
+ grow(delta: AddressValue, value?: any): AddressValue;
12844
12879
  /**
12845
12880
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
12846
12881
  *
12847
12882
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
12848
12883
  */
12849
- set(index: number, value?: any): void;
12884
+ set(index: AddressValue, value?: any): void;
12850
12885
  }
12851
12886
 
12852
12887
  var Table: {
@@ -12854,14 +12889,32 @@ declare namespace WebAssembly {
12854
12889
  new(descriptor: TableDescriptor, value?: any): Table;
12855
12890
  };
12856
12891
 
12892
+ /**
12893
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
12894
+ *
12895
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
12896
+ */
12897
+ interface Tag {
12898
+ }
12899
+
12900
+ var Tag: {
12901
+ prototype: Tag;
12902
+ new(type: TagType): Tag;
12903
+ };
12904
+
12905
+ interface ExceptionOptions {
12906
+ traceStack?: boolean;
12907
+ }
12908
+
12857
12909
  interface GlobalDescriptor<T extends ValueType = ValueType> {
12858
12910
  mutable?: boolean;
12859
12911
  value: T;
12860
12912
  }
12861
12913
 
12862
12914
  interface MemoryDescriptor {
12863
- initial: number;
12864
- maximum?: number;
12915
+ address?: AddressType;
12916
+ initial: AddressValue;
12917
+ maximum?: AddressValue;
12865
12918
  shared?: boolean;
12866
12919
  }
12867
12920
 
@@ -12877,9 +12930,14 @@ declare namespace WebAssembly {
12877
12930
  }
12878
12931
 
12879
12932
  interface TableDescriptor {
12933
+ address?: AddressType;
12880
12934
  element: TableKind;
12881
- initial: number;
12882
- maximum?: number;
12935
+ initial: AddressValue;
12936
+ maximum?: AddressValue;
12937
+ }
12938
+
12939
+ interface TagType {
12940
+ parameters: ValueType[];
12883
12941
  }
12884
12942
 
12885
12943
  interface ValueTypeMap {
@@ -12892,30 +12950,38 @@ declare namespace WebAssembly {
12892
12950
  v128: never;
12893
12951
  }
12894
12952
 
12953
+ interface WebAssemblyCompileOptions {
12954
+ builtins?: string[];
12955
+ importedStringConstants?: string | null;
12956
+ }
12957
+
12895
12958
  interface WebAssemblyInstantiatedSource {
12896
12959
  instance: Instance;
12897
12960
  module: Module;
12898
12961
  }
12899
12962
 
12900
- type ImportExportKind = "function" | "global" | "memory" | "table";
12963
+ type AddressType = "i32" | "i64";
12964
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
12901
12965
  type TableKind = "anyfunc" | "externref";
12966
+ type AddressValue = number;
12902
12967
  type ExportValue = Function | Global | Memory | Table;
12903
12968
  type Exports = Record<string, ExportValue>;
12904
12969
  type ImportValue = ExportValue | number;
12905
12970
  type Imports = Record<string, ModuleImports>;
12906
12971
  type ModuleImports = Record<string, ImportValue>;
12907
12972
  type ValueType = keyof ValueTypeMap;
12973
+ var JSTag: Tag;
12908
12974
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
12909
- function compile(bytes: BufferSource): Promise<Module>;
12975
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
12910
12976
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
12911
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
12977
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
12912
12978
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
12913
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12979
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12914
12980
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
12915
12981
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
12916
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12982
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12917
12983
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
12918
- function validate(bytes: BufferSource): boolean;
12984
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
12919
12985
  }
12920
12986
 
12921
12987
  /** 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/webworker",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "description": "Types for the global scope of Web Workers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -675,6 +675,10 @@ interface RTCEncodedVideoFrameMetadata extends RTCEncodedFrameMetadata {
675
675
  width?: number;
676
676
  }
677
677
 
678
+ interface ReadableStreamBYOBReaderReadOptions {
679
+ min?: number;
680
+ }
681
+
678
682
  interface ReadableStreamGetReaderOptions {
679
683
  /**
680
684
  * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
@@ -7105,6 +7109,12 @@ declare var PushManager: {
7105
7109
  readonly supportedContentEncodings: ReadonlyArray<string>;
7106
7110
  };
7107
7111
 
7112
+ /** Available only in secure contexts. */
7113
+ interface PushManagerAttribute {
7114
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
7115
+ readonly pushManager: PushManager;
7116
+ }
7117
+
7108
7118
  /**
7109
7119
  * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats.
7110
7120
  * Available only in secure contexts.
@@ -7584,7 +7594,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
7584
7594
  *
7585
7595
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
7586
7596
  */
7587
- read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
7597
+ read<T extends ArrayBufferView>(view: T, options?: ReadableStreamBYOBReaderReadOptions): Promise<ReadableStreamReadResult<T>>;
7588
7598
  /**
7589
7599
  * The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
7590
7600
  *
@@ -8215,7 +8225,7 @@ interface ServiceWorkerRegistrationEventMap {
8215
8225
  *
8216
8226
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
8217
8227
  */
8218
- interface ServiceWorkerRegistration extends EventTarget {
8228
+ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
8219
8229
  /**
8220
8230
  * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`.
8221
8231
  *
@@ -8242,12 +8252,6 @@ interface ServiceWorkerRegistration extends EventTarget {
8242
8252
  readonly navigationPreload: NavigationPreloadManager;
8243
8253
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
8244
8254
  onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
8245
- /**
8246
- * 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.
8247
- *
8248
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager)
8249
- */
8250
- readonly pushManager: PushManager;
8251
8255
  /**
8252
8256
  * 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.
8253
8257
  *
@@ -12706,6 +12710,37 @@ declare namespace WebAssembly {
12706
12710
  (message?: string): CompileError;
12707
12711
  };
12708
12712
 
12713
+ /**
12714
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
12715
+ *
12716
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
12717
+ */
12718
+ interface Exception {
12719
+ /**
12720
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
12721
+ *
12722
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
12723
+ */
12724
+ readonly stack: string | undefined;
12725
+ /**
12726
+ * 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.
12727
+ *
12728
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
12729
+ */
12730
+ getArg(index: number): any;
12731
+ /**
12732
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
12733
+ *
12734
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
12735
+ */
12736
+ is(exceptionTag: Tag): boolean;
12737
+ }
12738
+
12739
+ var Exception: {
12740
+ prototype: Exception;
12741
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
12742
+ };
12743
+
12709
12744
  /**
12710
12745
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
12711
12746
  *
@@ -12766,7 +12801,7 @@ declare namespace WebAssembly {
12766
12801
  *
12767
12802
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
12768
12803
  */
12769
- grow(delta: number): number;
12804
+ grow(delta: AddressValue): AddressValue;
12770
12805
  }
12771
12806
 
12772
12807
  var Memory: {
@@ -12784,7 +12819,7 @@ declare namespace WebAssembly {
12784
12819
 
12785
12820
  var Module: {
12786
12821
  prototype: Module;
12787
- new(bytes: BufferSource): Module;
12822
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
12788
12823
  /**
12789
12824
  * 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.
12790
12825
  *
@@ -12825,25 +12860,25 @@ declare namespace WebAssembly {
12825
12860
  *
12826
12861
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
12827
12862
  */
12828
- readonly length: number;
12863
+ readonly length: AddressValue;
12829
12864
  /**
12830
12865
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
12831
12866
  *
12832
12867
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
12833
12868
  */
12834
- get(index: number): any;
12869
+ get(index: AddressValue): any;
12835
12870
  /**
12836
12871
  * 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.
12837
12872
  *
12838
12873
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
12839
12874
  */
12840
- grow(delta: number, value?: any): number;
12875
+ grow(delta: AddressValue, value?: any): AddressValue;
12841
12876
  /**
12842
12877
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
12843
12878
  *
12844
12879
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
12845
12880
  */
12846
- set(index: number, value?: any): void;
12881
+ set(index: AddressValue, value?: any): void;
12847
12882
  }
12848
12883
 
12849
12884
  var Table: {
@@ -12851,14 +12886,32 @@ declare namespace WebAssembly {
12851
12886
  new(descriptor: TableDescriptor, value?: any): Table;
12852
12887
  };
12853
12888
 
12889
+ /**
12890
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
12891
+ *
12892
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
12893
+ */
12894
+ interface Tag {
12895
+ }
12896
+
12897
+ var Tag: {
12898
+ prototype: Tag;
12899
+ new(type: TagType): Tag;
12900
+ };
12901
+
12902
+ interface ExceptionOptions {
12903
+ traceStack?: boolean;
12904
+ }
12905
+
12854
12906
  interface GlobalDescriptor<T extends ValueType = ValueType> {
12855
12907
  mutable?: boolean;
12856
12908
  value: T;
12857
12909
  }
12858
12910
 
12859
12911
  interface MemoryDescriptor {
12860
- initial: number;
12861
- maximum?: number;
12912
+ address?: AddressType;
12913
+ initial: AddressValue;
12914
+ maximum?: AddressValue;
12862
12915
  shared?: boolean;
12863
12916
  }
12864
12917
 
@@ -12874,9 +12927,14 @@ declare namespace WebAssembly {
12874
12927
  }
12875
12928
 
12876
12929
  interface TableDescriptor {
12930
+ address?: AddressType;
12877
12931
  element: TableKind;
12878
- initial: number;
12879
- maximum?: number;
12932
+ initial: AddressValue;
12933
+ maximum?: AddressValue;
12934
+ }
12935
+
12936
+ interface TagType {
12937
+ parameters: ValueType[];
12880
12938
  }
12881
12939
 
12882
12940
  interface ValueTypeMap {
@@ -12889,30 +12947,38 @@ declare namespace WebAssembly {
12889
12947
  v128: never;
12890
12948
  }
12891
12949
 
12950
+ interface WebAssemblyCompileOptions {
12951
+ builtins?: string[];
12952
+ importedStringConstants?: string | null;
12953
+ }
12954
+
12892
12955
  interface WebAssemblyInstantiatedSource {
12893
12956
  instance: Instance;
12894
12957
  module: Module;
12895
12958
  }
12896
12959
 
12897
- type ImportExportKind = "function" | "global" | "memory" | "table";
12960
+ type AddressType = "i32" | "i64";
12961
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
12898
12962
  type TableKind = "anyfunc" | "externref";
12963
+ type AddressValue = number;
12899
12964
  type ExportValue = Function | Global | Memory | Table;
12900
12965
  type Exports = Record<string, ExportValue>;
12901
12966
  type ImportValue = ExportValue | number;
12902
12967
  type Imports = Record<string, ModuleImports>;
12903
12968
  type ModuleImports = Record<string, ImportValue>;
12904
12969
  type ValueType = keyof ValueTypeMap;
12970
+ var JSTag: Tag;
12905
12971
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
12906
- function compile(bytes: BufferSource): Promise<Module>;
12972
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
12907
12973
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
12908
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
12974
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
12909
12975
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
12910
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12976
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12911
12977
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
12912
12978
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
12913
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12979
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12914
12980
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
12915
- function validate(bytes: BufferSource): boolean;
12981
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
12916
12982
  }
12917
12983
 
12918
12984
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
package/ts5.6/index.d.ts CHANGED
@@ -675,6 +675,10 @@ interface RTCEncodedVideoFrameMetadata extends RTCEncodedFrameMetadata {
675
675
  width?: number;
676
676
  }
677
677
 
678
+ interface ReadableStreamBYOBReaderReadOptions {
679
+ min?: number;
680
+ }
681
+
678
682
  interface ReadableStreamGetReaderOptions {
679
683
  /**
680
684
  * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
@@ -7105,6 +7109,12 @@ declare var PushManager: {
7105
7109
  readonly supportedContentEncodings: ReadonlyArray<string>;
7106
7110
  };
7107
7111
 
7112
+ /** Available only in secure contexts. */
7113
+ interface PushManagerAttribute {
7114
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
7115
+ readonly pushManager: PushManager;
7116
+ }
7117
+
7108
7118
  /**
7109
7119
  * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats.
7110
7120
  * Available only in secure contexts.
@@ -7584,7 +7594,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
7584
7594
  *
7585
7595
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
7586
7596
  */
7587
- read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
7597
+ read<T extends ArrayBufferView>(view: T, options?: ReadableStreamBYOBReaderReadOptions): Promise<ReadableStreamReadResult<T>>;
7588
7598
  /**
7589
7599
  * The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
7590
7600
  *
@@ -8215,7 +8225,7 @@ interface ServiceWorkerRegistrationEventMap {
8215
8225
  *
8216
8226
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
8217
8227
  */
8218
- interface ServiceWorkerRegistration extends EventTarget {
8228
+ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
8219
8229
  /**
8220
8230
  * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`.
8221
8231
  *
@@ -8242,12 +8252,6 @@ interface ServiceWorkerRegistration extends EventTarget {
8242
8252
  readonly navigationPreload: NavigationPreloadManager;
8243
8253
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
8244
8254
  onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
8245
- /**
8246
- * 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.
8247
- *
8248
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager)
8249
- */
8250
- readonly pushManager: PushManager;
8251
8255
  /**
8252
8256
  * 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.
8253
8257
  *
@@ -12706,6 +12710,37 @@ declare namespace WebAssembly {
12706
12710
  (message?: string): CompileError;
12707
12711
  };
12708
12712
 
12713
+ /**
12714
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
12715
+ *
12716
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
12717
+ */
12718
+ interface Exception {
12719
+ /**
12720
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
12721
+ *
12722
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
12723
+ */
12724
+ readonly stack: string | undefined;
12725
+ /**
12726
+ * 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.
12727
+ *
12728
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
12729
+ */
12730
+ getArg(index: number): any;
12731
+ /**
12732
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
12733
+ *
12734
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
12735
+ */
12736
+ is(exceptionTag: Tag): boolean;
12737
+ }
12738
+
12739
+ var Exception: {
12740
+ prototype: Exception;
12741
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
12742
+ };
12743
+
12709
12744
  /**
12710
12745
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
12711
12746
  *
@@ -12766,7 +12801,7 @@ declare namespace WebAssembly {
12766
12801
  *
12767
12802
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
12768
12803
  */
12769
- grow(delta: number): number;
12804
+ grow(delta: AddressValue): AddressValue;
12770
12805
  }
12771
12806
 
12772
12807
  var Memory: {
@@ -12784,7 +12819,7 @@ declare namespace WebAssembly {
12784
12819
 
12785
12820
  var Module: {
12786
12821
  prototype: Module;
12787
- new(bytes: BufferSource): Module;
12822
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
12788
12823
  /**
12789
12824
  * 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.
12790
12825
  *
@@ -12825,25 +12860,25 @@ declare namespace WebAssembly {
12825
12860
  *
12826
12861
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
12827
12862
  */
12828
- readonly length: number;
12863
+ readonly length: AddressValue;
12829
12864
  /**
12830
12865
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
12831
12866
  *
12832
12867
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
12833
12868
  */
12834
- get(index: number): any;
12869
+ get(index: AddressValue): any;
12835
12870
  /**
12836
12871
  * 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.
12837
12872
  *
12838
12873
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
12839
12874
  */
12840
- grow(delta: number, value?: any): number;
12875
+ grow(delta: AddressValue, value?: any): AddressValue;
12841
12876
  /**
12842
12877
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
12843
12878
  *
12844
12879
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
12845
12880
  */
12846
- set(index: number, value?: any): void;
12881
+ set(index: AddressValue, value?: any): void;
12847
12882
  }
12848
12883
 
12849
12884
  var Table: {
@@ -12851,14 +12886,32 @@ declare namespace WebAssembly {
12851
12886
  new(descriptor: TableDescriptor, value?: any): Table;
12852
12887
  };
12853
12888
 
12889
+ /**
12890
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
12891
+ *
12892
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
12893
+ */
12894
+ interface Tag {
12895
+ }
12896
+
12897
+ var Tag: {
12898
+ prototype: Tag;
12899
+ new(type: TagType): Tag;
12900
+ };
12901
+
12902
+ interface ExceptionOptions {
12903
+ traceStack?: boolean;
12904
+ }
12905
+
12854
12906
  interface GlobalDescriptor<T extends ValueType = ValueType> {
12855
12907
  mutable?: boolean;
12856
12908
  value: T;
12857
12909
  }
12858
12910
 
12859
12911
  interface MemoryDescriptor {
12860
- initial: number;
12861
- maximum?: number;
12912
+ address?: AddressType;
12913
+ initial: AddressValue;
12914
+ maximum?: AddressValue;
12862
12915
  shared?: boolean;
12863
12916
  }
12864
12917
 
@@ -12874,9 +12927,14 @@ declare namespace WebAssembly {
12874
12927
  }
12875
12928
 
12876
12929
  interface TableDescriptor {
12930
+ address?: AddressType;
12877
12931
  element: TableKind;
12878
- initial: number;
12879
- maximum?: number;
12932
+ initial: AddressValue;
12933
+ maximum?: AddressValue;
12934
+ }
12935
+
12936
+ interface TagType {
12937
+ parameters: ValueType[];
12880
12938
  }
12881
12939
 
12882
12940
  interface ValueTypeMap {
@@ -12889,30 +12947,38 @@ declare namespace WebAssembly {
12889
12947
  v128: never;
12890
12948
  }
12891
12949
 
12950
+ interface WebAssemblyCompileOptions {
12951
+ builtins?: string[];
12952
+ importedStringConstants?: string | null;
12953
+ }
12954
+
12892
12955
  interface WebAssemblyInstantiatedSource {
12893
12956
  instance: Instance;
12894
12957
  module: Module;
12895
12958
  }
12896
12959
 
12897
- type ImportExportKind = "function" | "global" | "memory" | "table";
12960
+ type AddressType = "i32" | "i64";
12961
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
12898
12962
  type TableKind = "anyfunc" | "externref";
12963
+ type AddressValue = number;
12899
12964
  type ExportValue = Function | Global | Memory | Table;
12900
12965
  type Exports = Record<string, ExportValue>;
12901
12966
  type ImportValue = ExportValue | number;
12902
12967
  type Imports = Record<string, ModuleImports>;
12903
12968
  type ModuleImports = Record<string, ImportValue>;
12904
12969
  type ValueType = keyof ValueTypeMap;
12970
+ var JSTag: Tag;
12905
12971
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
12906
- function compile(bytes: BufferSource): Promise<Module>;
12972
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
12907
12973
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
12908
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
12974
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
12909
12975
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
12910
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12976
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12911
12977
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
12912
12978
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
12913
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12979
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12914
12980
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
12915
- function validate(bytes: BufferSource): boolean;
12981
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
12916
12982
  }
12917
12983
 
12918
12984
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
package/ts5.9/index.d.ts CHANGED
@@ -675,6 +675,10 @@ interface RTCEncodedVideoFrameMetadata extends RTCEncodedFrameMetadata {
675
675
  width?: number;
676
676
  }
677
677
 
678
+ interface ReadableStreamBYOBReaderReadOptions {
679
+ min?: number;
680
+ }
681
+
678
682
  interface ReadableStreamGetReaderOptions {
679
683
  /**
680
684
  * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
@@ -7105,6 +7109,12 @@ declare var PushManager: {
7105
7109
  readonly supportedContentEncodings: ReadonlyArray<string>;
7106
7110
  };
7107
7111
 
7112
+ /** Available only in secure contexts. */
7113
+ interface PushManagerAttribute {
7114
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
7115
+ readonly pushManager: PushManager;
7116
+ }
7117
+
7108
7118
  /**
7109
7119
  * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats.
7110
7120
  * Available only in secure contexts.
@@ -7584,7 +7594,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
7584
7594
  *
7585
7595
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
7586
7596
  */
7587
- read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
7597
+ read<T extends ArrayBufferView>(view: T, options?: ReadableStreamBYOBReaderReadOptions): Promise<ReadableStreamReadResult<T>>;
7588
7598
  /**
7589
7599
  * The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
7590
7600
  *
@@ -8215,7 +8225,7 @@ interface ServiceWorkerRegistrationEventMap {
8215
8225
  *
8216
8226
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
8217
8227
  */
8218
- interface ServiceWorkerRegistration extends EventTarget {
8228
+ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
8219
8229
  /**
8220
8230
  * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`.
8221
8231
  *
@@ -8242,12 +8252,6 @@ interface ServiceWorkerRegistration extends EventTarget {
8242
8252
  readonly navigationPreload: NavigationPreloadManager;
8243
8253
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
8244
8254
  onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
8245
- /**
8246
- * 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.
8247
- *
8248
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager)
8249
- */
8250
- readonly pushManager: PushManager;
8251
8255
  /**
8252
8256
  * 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.
8253
8257
  *
@@ -12706,6 +12710,37 @@ declare namespace WebAssembly {
12706
12710
  (message?: string): CompileError;
12707
12711
  };
12708
12712
 
12713
+ /**
12714
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
12715
+ *
12716
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
12717
+ */
12718
+ interface Exception {
12719
+ /**
12720
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
12721
+ *
12722
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
12723
+ */
12724
+ readonly stack: string | undefined;
12725
+ /**
12726
+ * 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.
12727
+ *
12728
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
12729
+ */
12730
+ getArg(index: number): any;
12731
+ /**
12732
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
12733
+ *
12734
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
12735
+ */
12736
+ is(exceptionTag: Tag): boolean;
12737
+ }
12738
+
12739
+ var Exception: {
12740
+ prototype: Exception;
12741
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
12742
+ };
12743
+
12709
12744
  /**
12710
12745
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
12711
12746
  *
@@ -12766,7 +12801,7 @@ declare namespace WebAssembly {
12766
12801
  *
12767
12802
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
12768
12803
  */
12769
- grow(delta: number): number;
12804
+ grow(delta: AddressValue): AddressValue;
12770
12805
  }
12771
12806
 
12772
12807
  var Memory: {
@@ -12784,7 +12819,7 @@ declare namespace WebAssembly {
12784
12819
 
12785
12820
  var Module: {
12786
12821
  prototype: Module;
12787
- new(bytes: BufferSource): Module;
12822
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
12788
12823
  /**
12789
12824
  * 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.
12790
12825
  *
@@ -12825,25 +12860,25 @@ declare namespace WebAssembly {
12825
12860
  *
12826
12861
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
12827
12862
  */
12828
- readonly length: number;
12863
+ readonly length: AddressValue;
12829
12864
  /**
12830
12865
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
12831
12866
  *
12832
12867
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
12833
12868
  */
12834
- get(index: number): any;
12869
+ get(index: AddressValue): any;
12835
12870
  /**
12836
12871
  * 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.
12837
12872
  *
12838
12873
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
12839
12874
  */
12840
- grow(delta: number, value?: any): number;
12875
+ grow(delta: AddressValue, value?: any): AddressValue;
12841
12876
  /**
12842
12877
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
12843
12878
  *
12844
12879
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
12845
12880
  */
12846
- set(index: number, value?: any): void;
12881
+ set(index: AddressValue, value?: any): void;
12847
12882
  }
12848
12883
 
12849
12884
  var Table: {
@@ -12851,14 +12886,32 @@ declare namespace WebAssembly {
12851
12886
  new(descriptor: TableDescriptor, value?: any): Table;
12852
12887
  };
12853
12888
 
12889
+ /**
12890
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
12891
+ *
12892
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
12893
+ */
12894
+ interface Tag {
12895
+ }
12896
+
12897
+ var Tag: {
12898
+ prototype: Tag;
12899
+ new(type: TagType): Tag;
12900
+ };
12901
+
12902
+ interface ExceptionOptions {
12903
+ traceStack?: boolean;
12904
+ }
12905
+
12854
12906
  interface GlobalDescriptor<T extends ValueType = ValueType> {
12855
12907
  mutable?: boolean;
12856
12908
  value: T;
12857
12909
  }
12858
12910
 
12859
12911
  interface MemoryDescriptor {
12860
- initial: number;
12861
- maximum?: number;
12912
+ address?: AddressType;
12913
+ initial: AddressValue;
12914
+ maximum?: AddressValue;
12862
12915
  shared?: boolean;
12863
12916
  }
12864
12917
 
@@ -12874,9 +12927,14 @@ declare namespace WebAssembly {
12874
12927
  }
12875
12928
 
12876
12929
  interface TableDescriptor {
12930
+ address?: AddressType;
12877
12931
  element: TableKind;
12878
- initial: number;
12879
- maximum?: number;
12932
+ initial: AddressValue;
12933
+ maximum?: AddressValue;
12934
+ }
12935
+
12936
+ interface TagType {
12937
+ parameters: ValueType[];
12880
12938
  }
12881
12939
 
12882
12940
  interface ValueTypeMap {
@@ -12889,30 +12947,38 @@ declare namespace WebAssembly {
12889
12947
  v128: never;
12890
12948
  }
12891
12949
 
12950
+ interface WebAssemblyCompileOptions {
12951
+ builtins?: string[];
12952
+ importedStringConstants?: string | null;
12953
+ }
12954
+
12892
12955
  interface WebAssemblyInstantiatedSource {
12893
12956
  instance: Instance;
12894
12957
  module: Module;
12895
12958
  }
12896
12959
 
12897
- type ImportExportKind = "function" | "global" | "memory" | "table";
12960
+ type AddressType = "i32" | "i64";
12961
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
12898
12962
  type TableKind = "anyfunc" | "externref";
12963
+ type AddressValue = number;
12899
12964
  type ExportValue = Function | Global | Memory | Table;
12900
12965
  type Exports = Record<string, ExportValue>;
12901
12966
  type ImportValue = ExportValue | number;
12902
12967
  type Imports = Record<string, ModuleImports>;
12903
12968
  type ModuleImports = Record<string, ImportValue>;
12904
12969
  type ValueType = keyof ValueTypeMap;
12970
+ var JSTag: Tag;
12905
12971
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
12906
- function compile(bytes: BufferSource): Promise<Module>;
12972
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
12907
12973
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
12908
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
12974
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
12909
12975
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
12910
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12976
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12911
12977
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
12912
12978
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
12913
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12979
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12914
12980
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
12915
- function validate(bytes: BufferSource): boolean;
12981
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
12916
12982
  }
12917
12983
 
12918
12984
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */