@types/webworker 0.0.32 → 0.0.34

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.32 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.32.
48
+ You can read what changed in version 0.0.34 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.34.
package/index.d.ts CHANGED
@@ -7108,6 +7108,12 @@ declare var PushManager: {
7108
7108
  readonly supportedContentEncodings: ReadonlyArray<string>;
7109
7109
  };
7110
7110
 
7111
+ /** Available only in secure contexts. */
7112
+ interface PushManagerAttribute {
7113
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
7114
+ readonly pushManager: PushManager;
7115
+ }
7116
+
7111
7117
  /**
7112
7118
  * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats.
7113
7119
  * Available only in secure contexts.
@@ -8218,7 +8224,7 @@ interface ServiceWorkerRegistrationEventMap {
8218
8224
  *
8219
8225
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
8220
8226
  */
8221
- interface ServiceWorkerRegistration extends EventTarget {
8227
+ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
8222
8228
  /**
8223
8229
  * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`.
8224
8230
  *
@@ -8245,12 +8251,6 @@ interface ServiceWorkerRegistration extends EventTarget {
8245
8251
  readonly navigationPreload: NavigationPreloadManager;
8246
8252
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
8247
8253
  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
8254
  /**
8255
8255
  * 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
8256
  *
@@ -12709,6 +12709,37 @@ declare namespace WebAssembly {
12709
12709
  (message?: string): CompileError;
12710
12710
  };
12711
12711
 
12712
+ /**
12713
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
12714
+ *
12715
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
12716
+ */
12717
+ interface Exception {
12718
+ /**
12719
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
12720
+ *
12721
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
12722
+ */
12723
+ readonly stack: string | undefined;
12724
+ /**
12725
+ * 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.
12726
+ *
12727
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
12728
+ */
12729
+ getArg(index: number): any;
12730
+ /**
12731
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
12732
+ *
12733
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
12734
+ */
12735
+ is(exceptionTag: Tag): boolean;
12736
+ }
12737
+
12738
+ var Exception: {
12739
+ prototype: Exception;
12740
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
12741
+ };
12742
+
12712
12743
  /**
12713
12744
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
12714
12745
  *
@@ -12769,7 +12800,7 @@ declare namespace WebAssembly {
12769
12800
  *
12770
12801
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
12771
12802
  */
12772
- grow(delta: number): number;
12803
+ grow(delta: AddressValue): AddressValue;
12773
12804
  }
12774
12805
 
12775
12806
  var Memory: {
@@ -12787,7 +12818,7 @@ declare namespace WebAssembly {
12787
12818
 
12788
12819
  var Module: {
12789
12820
  prototype: Module;
12790
- new(bytes: BufferSource): Module;
12821
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
12791
12822
  /**
12792
12823
  * 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
12824
  *
@@ -12828,25 +12859,25 @@ declare namespace WebAssembly {
12828
12859
  *
12829
12860
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
12830
12861
  */
12831
- readonly length: number;
12862
+ readonly length: AddressValue;
12832
12863
  /**
12833
12864
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
12834
12865
  *
12835
12866
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
12836
12867
  */
12837
- get(index: number): any;
12868
+ get(index: AddressValue): any;
12838
12869
  /**
12839
12870
  * 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
12871
  *
12841
12872
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
12842
12873
  */
12843
- grow(delta: number, value?: any): number;
12874
+ grow(delta: AddressValue, value?: any): AddressValue;
12844
12875
  /**
12845
12876
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
12846
12877
  *
12847
12878
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
12848
12879
  */
12849
- set(index: number, value?: any): void;
12880
+ set(index: AddressValue, value?: any): void;
12850
12881
  }
12851
12882
 
12852
12883
  var Table: {
@@ -12854,14 +12885,32 @@ declare namespace WebAssembly {
12854
12885
  new(descriptor: TableDescriptor, value?: any): Table;
12855
12886
  };
12856
12887
 
12888
+ /**
12889
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
12890
+ *
12891
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
12892
+ */
12893
+ interface Tag {
12894
+ }
12895
+
12896
+ var Tag: {
12897
+ prototype: Tag;
12898
+ new(type: TagType): Tag;
12899
+ };
12900
+
12901
+ interface ExceptionOptions {
12902
+ traceStack?: boolean;
12903
+ }
12904
+
12857
12905
  interface GlobalDescriptor<T extends ValueType = ValueType> {
12858
12906
  mutable?: boolean;
12859
12907
  value: T;
12860
12908
  }
12861
12909
 
12862
12910
  interface MemoryDescriptor {
12863
- initial: number;
12864
- maximum?: number;
12911
+ address?: AddressType;
12912
+ initial: AddressValue;
12913
+ maximum?: AddressValue;
12865
12914
  shared?: boolean;
12866
12915
  }
12867
12916
 
@@ -12877,9 +12926,14 @@ declare namespace WebAssembly {
12877
12926
  }
12878
12927
 
12879
12928
  interface TableDescriptor {
12929
+ address?: AddressType;
12880
12930
  element: TableKind;
12881
- initial: number;
12882
- maximum?: number;
12931
+ initial: AddressValue;
12932
+ maximum?: AddressValue;
12933
+ }
12934
+
12935
+ interface TagType {
12936
+ parameters: ValueType[];
12883
12937
  }
12884
12938
 
12885
12939
  interface ValueTypeMap {
@@ -12892,30 +12946,38 @@ declare namespace WebAssembly {
12892
12946
  v128: never;
12893
12947
  }
12894
12948
 
12949
+ interface WebAssemblyCompileOptions {
12950
+ builtins?: string[];
12951
+ importedStringConstants?: string | null;
12952
+ }
12953
+
12895
12954
  interface WebAssemblyInstantiatedSource {
12896
12955
  instance: Instance;
12897
12956
  module: Module;
12898
12957
  }
12899
12958
 
12900
- type ImportExportKind = "function" | "global" | "memory" | "table";
12959
+ type AddressType = "i32" | "i64";
12960
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
12901
12961
  type TableKind = "anyfunc" | "externref";
12962
+ type AddressValue = number;
12902
12963
  type ExportValue = Function | Global | Memory | Table;
12903
12964
  type Exports = Record<string, ExportValue>;
12904
12965
  type ImportValue = ExportValue | number;
12905
12966
  type Imports = Record<string, ModuleImports>;
12906
12967
  type ModuleImports = Record<string, ImportValue>;
12907
12968
  type ValueType = keyof ValueTypeMap;
12969
+ var JSTag: Tag;
12908
12970
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
12909
- function compile(bytes: BufferSource): Promise<Module>;
12971
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
12910
12972
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
12911
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
12973
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
12912
12974
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
12913
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12975
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12914
12976
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
12915
12977
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
12916
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12978
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12917
12979
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
12918
- function validate(bytes: BufferSource): boolean;
12980
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
12919
12981
  }
12920
12982
 
12921
12983
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
@@ -13739,10 +13801,10 @@ interface FileSystemDirectoryHandleAsyncIterator<T> extends AsyncIteratorObject<
13739
13801
  }
13740
13802
 
13741
13803
  interface FileSystemDirectoryHandle {
13742
- [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
13743
- entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
13804
+ [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>;
13805
+ entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>;
13744
13806
  keys(): FileSystemDirectoryHandleAsyncIterator<string>;
13745
- values(): FileSystemDirectoryHandleAsyncIterator<FileSystemHandle>;
13807
+ values(): FileSystemDirectoryHandleAsyncIterator<FileSystemDirectoryHandle | FileSystemFileHandle>;
13746
13808
  }
13747
13809
 
13748
13810
  interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/webworker",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "Types for the global scope of Web Workers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
@@ -3,10 +3,10 @@
3
3
  /////////////////////////////
4
4
 
5
5
  interface FileSystemDirectoryHandle {
6
- [Symbol.asyncIterator](): AsyncIterableIterator<[string, FileSystemHandle]>;
7
- entries(): AsyncIterableIterator<[string, FileSystemHandle]>;
6
+ [Symbol.asyncIterator](): AsyncIterableIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>;
7
+ entries(): AsyncIterableIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>;
8
8
  keys(): AsyncIterableIterator<string>;
9
- values(): AsyncIterableIterator<FileSystemHandle>;
9
+ values(): AsyncIterableIterator<FileSystemDirectoryHandle | FileSystemFileHandle>;
10
10
  }
11
11
 
12
12
  interface ReadableStream<R = any> {
package/ts5.5/index.d.ts CHANGED
@@ -7105,6 +7105,12 @@ declare var PushManager: {
7105
7105
  readonly supportedContentEncodings: ReadonlyArray<string>;
7106
7106
  };
7107
7107
 
7108
+ /** Available only in secure contexts. */
7109
+ interface PushManagerAttribute {
7110
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
7111
+ readonly pushManager: PushManager;
7112
+ }
7113
+
7108
7114
  /**
7109
7115
  * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats.
7110
7116
  * Available only in secure contexts.
@@ -8215,7 +8221,7 @@ interface ServiceWorkerRegistrationEventMap {
8215
8221
  *
8216
8222
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
8217
8223
  */
8218
- interface ServiceWorkerRegistration extends EventTarget {
8224
+ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
8219
8225
  /**
8220
8226
  * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`.
8221
8227
  *
@@ -8242,12 +8248,6 @@ interface ServiceWorkerRegistration extends EventTarget {
8242
8248
  readonly navigationPreload: NavigationPreloadManager;
8243
8249
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
8244
8250
  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
8251
  /**
8252
8252
  * 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
8253
  *
@@ -12706,6 +12706,37 @@ declare namespace WebAssembly {
12706
12706
  (message?: string): CompileError;
12707
12707
  };
12708
12708
 
12709
+ /**
12710
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
12711
+ *
12712
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
12713
+ */
12714
+ interface Exception {
12715
+ /**
12716
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
12717
+ *
12718
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
12719
+ */
12720
+ readonly stack: string | undefined;
12721
+ /**
12722
+ * 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.
12723
+ *
12724
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
12725
+ */
12726
+ getArg(index: number): any;
12727
+ /**
12728
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
12729
+ *
12730
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
12731
+ */
12732
+ is(exceptionTag: Tag): boolean;
12733
+ }
12734
+
12735
+ var Exception: {
12736
+ prototype: Exception;
12737
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
12738
+ };
12739
+
12709
12740
  /**
12710
12741
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
12711
12742
  *
@@ -12766,7 +12797,7 @@ declare namespace WebAssembly {
12766
12797
  *
12767
12798
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
12768
12799
  */
12769
- grow(delta: number): number;
12800
+ grow(delta: AddressValue): AddressValue;
12770
12801
  }
12771
12802
 
12772
12803
  var Memory: {
@@ -12784,7 +12815,7 @@ declare namespace WebAssembly {
12784
12815
 
12785
12816
  var Module: {
12786
12817
  prototype: Module;
12787
- new(bytes: BufferSource): Module;
12818
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
12788
12819
  /**
12789
12820
  * 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
12821
  *
@@ -12825,25 +12856,25 @@ declare namespace WebAssembly {
12825
12856
  *
12826
12857
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
12827
12858
  */
12828
- readonly length: number;
12859
+ readonly length: AddressValue;
12829
12860
  /**
12830
12861
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
12831
12862
  *
12832
12863
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
12833
12864
  */
12834
- get(index: number): any;
12865
+ get(index: AddressValue): any;
12835
12866
  /**
12836
12867
  * 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
12868
  *
12838
12869
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
12839
12870
  */
12840
- grow(delta: number, value?: any): number;
12871
+ grow(delta: AddressValue, value?: any): AddressValue;
12841
12872
  /**
12842
12873
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
12843
12874
  *
12844
12875
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
12845
12876
  */
12846
- set(index: number, value?: any): void;
12877
+ set(index: AddressValue, value?: any): void;
12847
12878
  }
12848
12879
 
12849
12880
  var Table: {
@@ -12851,14 +12882,32 @@ declare namespace WebAssembly {
12851
12882
  new(descriptor: TableDescriptor, value?: any): Table;
12852
12883
  };
12853
12884
 
12885
+ /**
12886
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
12887
+ *
12888
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
12889
+ */
12890
+ interface Tag {
12891
+ }
12892
+
12893
+ var Tag: {
12894
+ prototype: Tag;
12895
+ new(type: TagType): Tag;
12896
+ };
12897
+
12898
+ interface ExceptionOptions {
12899
+ traceStack?: boolean;
12900
+ }
12901
+
12854
12902
  interface GlobalDescriptor<T extends ValueType = ValueType> {
12855
12903
  mutable?: boolean;
12856
12904
  value: T;
12857
12905
  }
12858
12906
 
12859
12907
  interface MemoryDescriptor {
12860
- initial: number;
12861
- maximum?: number;
12908
+ address?: AddressType;
12909
+ initial: AddressValue;
12910
+ maximum?: AddressValue;
12862
12911
  shared?: boolean;
12863
12912
  }
12864
12913
 
@@ -12874,9 +12923,14 @@ declare namespace WebAssembly {
12874
12923
  }
12875
12924
 
12876
12925
  interface TableDescriptor {
12926
+ address?: AddressType;
12877
12927
  element: TableKind;
12878
- initial: number;
12879
- maximum?: number;
12928
+ initial: AddressValue;
12929
+ maximum?: AddressValue;
12930
+ }
12931
+
12932
+ interface TagType {
12933
+ parameters: ValueType[];
12880
12934
  }
12881
12935
 
12882
12936
  interface ValueTypeMap {
@@ -12889,30 +12943,38 @@ declare namespace WebAssembly {
12889
12943
  v128: never;
12890
12944
  }
12891
12945
 
12946
+ interface WebAssemblyCompileOptions {
12947
+ builtins?: string[];
12948
+ importedStringConstants?: string | null;
12949
+ }
12950
+
12892
12951
  interface WebAssemblyInstantiatedSource {
12893
12952
  instance: Instance;
12894
12953
  module: Module;
12895
12954
  }
12896
12955
 
12897
- type ImportExportKind = "function" | "global" | "memory" | "table";
12956
+ type AddressType = "i32" | "i64";
12957
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
12898
12958
  type TableKind = "anyfunc" | "externref";
12959
+ type AddressValue = number;
12899
12960
  type ExportValue = Function | Global | Memory | Table;
12900
12961
  type Exports = Record<string, ExportValue>;
12901
12962
  type ImportValue = ExportValue | number;
12902
12963
  type Imports = Record<string, ModuleImports>;
12903
12964
  type ModuleImports = Record<string, ImportValue>;
12904
12965
  type ValueType = keyof ValueTypeMap;
12966
+ var JSTag: Tag;
12905
12967
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
12906
- function compile(bytes: BufferSource): Promise<Module>;
12968
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
12907
12969
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
12908
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
12970
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
12909
12971
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
12910
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12972
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12911
12973
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
12912
12974
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
12913
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12975
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12914
12976
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
12915
- function validate(bytes: BufferSource): boolean;
12977
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
12916
12978
  }
12917
12979
 
12918
12980
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
@@ -7,10 +7,10 @@ interface FileSystemDirectoryHandleAsyncIterator<T> extends AsyncIteratorObject<
7
7
  }
8
8
 
9
9
  interface FileSystemDirectoryHandle {
10
- [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
11
- entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
10
+ [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>;
11
+ entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>;
12
12
  keys(): FileSystemDirectoryHandleAsyncIterator<string>;
13
- values(): FileSystemDirectoryHandleAsyncIterator<FileSystemHandle>;
13
+ values(): FileSystemDirectoryHandleAsyncIterator<FileSystemDirectoryHandle | FileSystemFileHandle>;
14
14
  }
15
15
 
16
16
  interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
package/ts5.6/index.d.ts CHANGED
@@ -7105,6 +7105,12 @@ declare var PushManager: {
7105
7105
  readonly supportedContentEncodings: ReadonlyArray<string>;
7106
7106
  };
7107
7107
 
7108
+ /** Available only in secure contexts. */
7109
+ interface PushManagerAttribute {
7110
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
7111
+ readonly pushManager: PushManager;
7112
+ }
7113
+
7108
7114
  /**
7109
7115
  * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats.
7110
7116
  * Available only in secure contexts.
@@ -8215,7 +8221,7 @@ interface ServiceWorkerRegistrationEventMap {
8215
8221
  *
8216
8222
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
8217
8223
  */
8218
- interface ServiceWorkerRegistration extends EventTarget {
8224
+ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
8219
8225
  /**
8220
8226
  * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`.
8221
8227
  *
@@ -8242,12 +8248,6 @@ interface ServiceWorkerRegistration extends EventTarget {
8242
8248
  readonly navigationPreload: NavigationPreloadManager;
8243
8249
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
8244
8250
  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
8251
  /**
8252
8252
  * 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
8253
  *
@@ -12706,6 +12706,37 @@ declare namespace WebAssembly {
12706
12706
  (message?: string): CompileError;
12707
12707
  };
12708
12708
 
12709
+ /**
12710
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
12711
+ *
12712
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
12713
+ */
12714
+ interface Exception {
12715
+ /**
12716
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
12717
+ *
12718
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
12719
+ */
12720
+ readonly stack: string | undefined;
12721
+ /**
12722
+ * 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.
12723
+ *
12724
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
12725
+ */
12726
+ getArg(index: number): any;
12727
+ /**
12728
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
12729
+ *
12730
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
12731
+ */
12732
+ is(exceptionTag: Tag): boolean;
12733
+ }
12734
+
12735
+ var Exception: {
12736
+ prototype: Exception;
12737
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
12738
+ };
12739
+
12709
12740
  /**
12710
12741
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
12711
12742
  *
@@ -12766,7 +12797,7 @@ declare namespace WebAssembly {
12766
12797
  *
12767
12798
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
12768
12799
  */
12769
- grow(delta: number): number;
12800
+ grow(delta: AddressValue): AddressValue;
12770
12801
  }
12771
12802
 
12772
12803
  var Memory: {
@@ -12784,7 +12815,7 @@ declare namespace WebAssembly {
12784
12815
 
12785
12816
  var Module: {
12786
12817
  prototype: Module;
12787
- new(bytes: BufferSource): Module;
12818
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
12788
12819
  /**
12789
12820
  * 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
12821
  *
@@ -12825,25 +12856,25 @@ declare namespace WebAssembly {
12825
12856
  *
12826
12857
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
12827
12858
  */
12828
- readonly length: number;
12859
+ readonly length: AddressValue;
12829
12860
  /**
12830
12861
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
12831
12862
  *
12832
12863
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
12833
12864
  */
12834
- get(index: number): any;
12865
+ get(index: AddressValue): any;
12835
12866
  /**
12836
12867
  * 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
12868
  *
12838
12869
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
12839
12870
  */
12840
- grow(delta: number, value?: any): number;
12871
+ grow(delta: AddressValue, value?: any): AddressValue;
12841
12872
  /**
12842
12873
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
12843
12874
  *
12844
12875
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
12845
12876
  */
12846
- set(index: number, value?: any): void;
12877
+ set(index: AddressValue, value?: any): void;
12847
12878
  }
12848
12879
 
12849
12880
  var Table: {
@@ -12851,14 +12882,32 @@ declare namespace WebAssembly {
12851
12882
  new(descriptor: TableDescriptor, value?: any): Table;
12852
12883
  };
12853
12884
 
12885
+ /**
12886
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
12887
+ *
12888
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
12889
+ */
12890
+ interface Tag {
12891
+ }
12892
+
12893
+ var Tag: {
12894
+ prototype: Tag;
12895
+ new(type: TagType): Tag;
12896
+ };
12897
+
12898
+ interface ExceptionOptions {
12899
+ traceStack?: boolean;
12900
+ }
12901
+
12854
12902
  interface GlobalDescriptor<T extends ValueType = ValueType> {
12855
12903
  mutable?: boolean;
12856
12904
  value: T;
12857
12905
  }
12858
12906
 
12859
12907
  interface MemoryDescriptor {
12860
- initial: number;
12861
- maximum?: number;
12908
+ address?: AddressType;
12909
+ initial: AddressValue;
12910
+ maximum?: AddressValue;
12862
12911
  shared?: boolean;
12863
12912
  }
12864
12913
 
@@ -12874,9 +12923,14 @@ declare namespace WebAssembly {
12874
12923
  }
12875
12924
 
12876
12925
  interface TableDescriptor {
12926
+ address?: AddressType;
12877
12927
  element: TableKind;
12878
- initial: number;
12879
- maximum?: number;
12928
+ initial: AddressValue;
12929
+ maximum?: AddressValue;
12930
+ }
12931
+
12932
+ interface TagType {
12933
+ parameters: ValueType[];
12880
12934
  }
12881
12935
 
12882
12936
  interface ValueTypeMap {
@@ -12889,30 +12943,38 @@ declare namespace WebAssembly {
12889
12943
  v128: never;
12890
12944
  }
12891
12945
 
12946
+ interface WebAssemblyCompileOptions {
12947
+ builtins?: string[];
12948
+ importedStringConstants?: string | null;
12949
+ }
12950
+
12892
12951
  interface WebAssemblyInstantiatedSource {
12893
12952
  instance: Instance;
12894
12953
  module: Module;
12895
12954
  }
12896
12955
 
12897
- type ImportExportKind = "function" | "global" | "memory" | "table";
12956
+ type AddressType = "i32" | "i64";
12957
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
12898
12958
  type TableKind = "anyfunc" | "externref";
12959
+ type AddressValue = number;
12899
12960
  type ExportValue = Function | Global | Memory | Table;
12900
12961
  type Exports = Record<string, ExportValue>;
12901
12962
  type ImportValue = ExportValue | number;
12902
12963
  type Imports = Record<string, ModuleImports>;
12903
12964
  type ModuleImports = Record<string, ImportValue>;
12904
12965
  type ValueType = keyof ValueTypeMap;
12966
+ var JSTag: Tag;
12905
12967
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
12906
- function compile(bytes: BufferSource): Promise<Module>;
12968
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
12907
12969
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
12908
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
12970
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
12909
12971
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
12910
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12972
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12911
12973
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
12912
12974
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
12913
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12975
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12914
12976
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
12915
- function validate(bytes: BufferSource): boolean;
12977
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
12916
12978
  }
12917
12979
 
12918
12980
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
@@ -7,10 +7,10 @@ interface FileSystemDirectoryHandleAsyncIterator<T> extends AsyncIteratorObject<
7
7
  }
8
8
 
9
9
  interface FileSystemDirectoryHandle {
10
- [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
11
- entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
10
+ [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>;
11
+ entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>;
12
12
  keys(): FileSystemDirectoryHandleAsyncIterator<string>;
13
- values(): FileSystemDirectoryHandleAsyncIterator<FileSystemHandle>;
13
+ values(): FileSystemDirectoryHandleAsyncIterator<FileSystemDirectoryHandle | FileSystemFileHandle>;
14
14
  }
15
15
 
16
16
  interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
package/ts5.9/index.d.ts CHANGED
@@ -7105,6 +7105,12 @@ declare var PushManager: {
7105
7105
  readonly supportedContentEncodings: ReadonlyArray<string>;
7106
7106
  };
7107
7107
 
7108
+ /** Available only in secure contexts. */
7109
+ interface PushManagerAttribute {
7110
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
7111
+ readonly pushManager: PushManager;
7112
+ }
7113
+
7108
7114
  /**
7109
7115
  * The **`PushMessageData`** interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats.
7110
7116
  * Available only in secure contexts.
@@ -8215,7 +8221,7 @@ interface ServiceWorkerRegistrationEventMap {
8215
8221
  *
8216
8222
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
8217
8223
  */
8218
- interface ServiceWorkerRegistration extends EventTarget {
8224
+ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
8219
8225
  /**
8220
8226
  * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is `activating` or `activated`.
8221
8227
  *
@@ -8242,12 +8248,6 @@ interface ServiceWorkerRegistration extends EventTarget {
8242
8248
  readonly navigationPreload: NavigationPreloadManager;
8243
8249
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
8244
8250
  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
8251
  /**
8252
8252
  * 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
8253
  *
@@ -12706,6 +12706,37 @@ declare namespace WebAssembly {
12706
12706
  (message?: string): CompileError;
12707
12707
  };
12708
12708
 
12709
+ /**
12710
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
12711
+ *
12712
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
12713
+ */
12714
+ interface Exception {
12715
+ /**
12716
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
12717
+ *
12718
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
12719
+ */
12720
+ readonly stack: string | undefined;
12721
+ /**
12722
+ * 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.
12723
+ *
12724
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
12725
+ */
12726
+ getArg(index: number): any;
12727
+ /**
12728
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
12729
+ *
12730
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
12731
+ */
12732
+ is(exceptionTag: Tag): boolean;
12733
+ }
12734
+
12735
+ var Exception: {
12736
+ prototype: Exception;
12737
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
12738
+ };
12739
+
12709
12740
  /**
12710
12741
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
12711
12742
  *
@@ -12766,7 +12797,7 @@ declare namespace WebAssembly {
12766
12797
  *
12767
12798
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
12768
12799
  */
12769
- grow(delta: number): number;
12800
+ grow(delta: AddressValue): AddressValue;
12770
12801
  }
12771
12802
 
12772
12803
  var Memory: {
@@ -12784,7 +12815,7 @@ declare namespace WebAssembly {
12784
12815
 
12785
12816
  var Module: {
12786
12817
  prototype: Module;
12787
- new(bytes: BufferSource): Module;
12818
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
12788
12819
  /**
12789
12820
  * 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
12821
  *
@@ -12825,25 +12856,25 @@ declare namespace WebAssembly {
12825
12856
  *
12826
12857
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
12827
12858
  */
12828
- readonly length: number;
12859
+ readonly length: AddressValue;
12829
12860
  /**
12830
12861
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
12831
12862
  *
12832
12863
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
12833
12864
  */
12834
- get(index: number): any;
12865
+ get(index: AddressValue): any;
12835
12866
  /**
12836
12867
  * 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
12868
  *
12838
12869
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
12839
12870
  */
12840
- grow(delta: number, value?: any): number;
12871
+ grow(delta: AddressValue, value?: any): AddressValue;
12841
12872
  /**
12842
12873
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
12843
12874
  *
12844
12875
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
12845
12876
  */
12846
- set(index: number, value?: any): void;
12877
+ set(index: AddressValue, value?: any): void;
12847
12878
  }
12848
12879
 
12849
12880
  var Table: {
@@ -12851,14 +12882,32 @@ declare namespace WebAssembly {
12851
12882
  new(descriptor: TableDescriptor, value?: any): Table;
12852
12883
  };
12853
12884
 
12885
+ /**
12886
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
12887
+ *
12888
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
12889
+ */
12890
+ interface Tag {
12891
+ }
12892
+
12893
+ var Tag: {
12894
+ prototype: Tag;
12895
+ new(type: TagType): Tag;
12896
+ };
12897
+
12898
+ interface ExceptionOptions {
12899
+ traceStack?: boolean;
12900
+ }
12901
+
12854
12902
  interface GlobalDescriptor<T extends ValueType = ValueType> {
12855
12903
  mutable?: boolean;
12856
12904
  value: T;
12857
12905
  }
12858
12906
 
12859
12907
  interface MemoryDescriptor {
12860
- initial: number;
12861
- maximum?: number;
12908
+ address?: AddressType;
12909
+ initial: AddressValue;
12910
+ maximum?: AddressValue;
12862
12911
  shared?: boolean;
12863
12912
  }
12864
12913
 
@@ -12874,9 +12923,14 @@ declare namespace WebAssembly {
12874
12923
  }
12875
12924
 
12876
12925
  interface TableDescriptor {
12926
+ address?: AddressType;
12877
12927
  element: TableKind;
12878
- initial: number;
12879
- maximum?: number;
12928
+ initial: AddressValue;
12929
+ maximum?: AddressValue;
12930
+ }
12931
+
12932
+ interface TagType {
12933
+ parameters: ValueType[];
12880
12934
  }
12881
12935
 
12882
12936
  interface ValueTypeMap {
@@ -12889,30 +12943,38 @@ declare namespace WebAssembly {
12889
12943
  v128: never;
12890
12944
  }
12891
12945
 
12946
+ interface WebAssemblyCompileOptions {
12947
+ builtins?: string[];
12948
+ importedStringConstants?: string | null;
12949
+ }
12950
+
12892
12951
  interface WebAssemblyInstantiatedSource {
12893
12952
  instance: Instance;
12894
12953
  module: Module;
12895
12954
  }
12896
12955
 
12897
- type ImportExportKind = "function" | "global" | "memory" | "table";
12956
+ type AddressType = "i32" | "i64";
12957
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
12898
12958
  type TableKind = "anyfunc" | "externref";
12959
+ type AddressValue = number;
12899
12960
  type ExportValue = Function | Global | Memory | Table;
12900
12961
  type Exports = Record<string, ExportValue>;
12901
12962
  type ImportValue = ExportValue | number;
12902
12963
  type Imports = Record<string, ModuleImports>;
12903
12964
  type ModuleImports = Record<string, ImportValue>;
12904
12965
  type ValueType = keyof ValueTypeMap;
12966
+ var JSTag: Tag;
12905
12967
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
12906
- function compile(bytes: BufferSource): Promise<Module>;
12968
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
12907
12969
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
12908
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
12970
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
12909
12971
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
12910
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12972
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12911
12973
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
12912
12974
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
12913
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
12975
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
12914
12976
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
12915
- function validate(bytes: BufferSource): boolean;
12977
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
12916
12978
  }
12917
12979
 
12918
12980
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */