@types/sharedworker 0.0.185 → 0.0.186

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -28,4 +28,4 @@ This project does not respect semantic versioning as almost every change could p
28
28
 
29
29
  ## Deploy Metadata
30
30
 
31
- You can read what changed in version 0.0.185 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.185.
31
+ You can read what changed in version 0.0.186 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.186.
package/index.d.ts CHANGED
@@ -6639,12 +6639,6 @@ interface ServiceWorkerRegistration extends EventTarget {
6639
6639
  readonly navigationPreload: NavigationPreloadManager;
6640
6640
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
6641
6641
  onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
6642
- /**
6643
- * 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.
6644
- *
6645
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager)
6646
- */
6647
- readonly pushManager: PushManager;
6648
6642
  /**
6649
6643
  * 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.
6650
6644
  *
@@ -10781,6 +10775,37 @@ declare namespace WebAssembly {
10781
10775
  (message?: string): CompileError;
10782
10776
  };
10783
10777
 
10778
+ /**
10779
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
10780
+ *
10781
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
10782
+ */
10783
+ interface Exception {
10784
+ /**
10785
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
10786
+ *
10787
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
10788
+ */
10789
+ readonly stack: string | undefined;
10790
+ /**
10791
+ * 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.
10792
+ *
10793
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
10794
+ */
10795
+ getArg(index: number): any;
10796
+ /**
10797
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
10798
+ *
10799
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
10800
+ */
10801
+ is(exceptionTag: Tag): boolean;
10802
+ }
10803
+
10804
+ var Exception: {
10805
+ prototype: Exception;
10806
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
10807
+ };
10808
+
10784
10809
  /**
10785
10810
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
10786
10811
  *
@@ -10841,7 +10866,7 @@ declare namespace WebAssembly {
10841
10866
  *
10842
10867
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
10843
10868
  */
10844
- grow(delta: number): number;
10869
+ grow(delta: AddressValue): AddressValue;
10845
10870
  }
10846
10871
 
10847
10872
  var Memory: {
@@ -10859,7 +10884,7 @@ declare namespace WebAssembly {
10859
10884
 
10860
10885
  var Module: {
10861
10886
  prototype: Module;
10862
- new(bytes: BufferSource): Module;
10887
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
10863
10888
  /**
10864
10889
  * 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.
10865
10890
  *
@@ -10900,25 +10925,25 @@ declare namespace WebAssembly {
10900
10925
  *
10901
10926
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
10902
10927
  */
10903
- readonly length: number;
10928
+ readonly length: AddressValue;
10904
10929
  /**
10905
10930
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
10906
10931
  *
10907
10932
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
10908
10933
  */
10909
- get(index: number): any;
10934
+ get(index: AddressValue): any;
10910
10935
  /**
10911
10936
  * 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.
10912
10937
  *
10913
10938
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
10914
10939
  */
10915
- grow(delta: number, value?: any): number;
10940
+ grow(delta: AddressValue, value?: any): AddressValue;
10916
10941
  /**
10917
10942
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
10918
10943
  *
10919
10944
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
10920
10945
  */
10921
- set(index: number, value?: any): void;
10946
+ set(index: AddressValue, value?: any): void;
10922
10947
  }
10923
10948
 
10924
10949
  var Table: {
@@ -10926,14 +10951,32 @@ declare namespace WebAssembly {
10926
10951
  new(descriptor: TableDescriptor, value?: any): Table;
10927
10952
  };
10928
10953
 
10954
+ /**
10955
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
10956
+ *
10957
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
10958
+ */
10959
+ interface Tag {
10960
+ }
10961
+
10962
+ var Tag: {
10963
+ prototype: Tag;
10964
+ new(type: TagType): Tag;
10965
+ };
10966
+
10967
+ interface ExceptionOptions {
10968
+ traceStack?: boolean;
10969
+ }
10970
+
10929
10971
  interface GlobalDescriptor<T extends ValueType = ValueType> {
10930
10972
  mutable?: boolean;
10931
10973
  value: T;
10932
10974
  }
10933
10975
 
10934
10976
  interface MemoryDescriptor {
10935
- initial: number;
10936
- maximum?: number;
10977
+ address?: AddressType;
10978
+ initial: AddressValue;
10979
+ maximum?: AddressValue;
10937
10980
  shared?: boolean;
10938
10981
  }
10939
10982
 
@@ -10949,9 +10992,14 @@ declare namespace WebAssembly {
10949
10992
  }
10950
10993
 
10951
10994
  interface TableDescriptor {
10995
+ address?: AddressType;
10952
10996
  element: TableKind;
10953
- initial: number;
10954
- maximum?: number;
10997
+ initial: AddressValue;
10998
+ maximum?: AddressValue;
10999
+ }
11000
+
11001
+ interface TagType {
11002
+ parameters: ValueType[];
10955
11003
  }
10956
11004
 
10957
11005
  interface ValueTypeMap {
@@ -10964,30 +11012,38 @@ declare namespace WebAssembly {
10964
11012
  v128: never;
10965
11013
  }
10966
11014
 
11015
+ interface WebAssemblyCompileOptions {
11016
+ builtins?: string[];
11017
+ importedStringConstants?: string | null;
11018
+ }
11019
+
10967
11020
  interface WebAssemblyInstantiatedSource {
10968
11021
  instance: Instance;
10969
11022
  module: Module;
10970
11023
  }
10971
11024
 
10972
- type ImportExportKind = "function" | "global" | "memory" | "table";
11025
+ type AddressType = "i32" | "i64";
11026
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
10973
11027
  type TableKind = "anyfunc" | "externref";
11028
+ type AddressValue = number;
10974
11029
  type ExportValue = Function | Global | Memory | Table;
10975
11030
  type Exports = Record<string, ExportValue>;
10976
11031
  type ImportValue = ExportValue | number;
10977
11032
  type Imports = Record<string, ModuleImports>;
10978
11033
  type ModuleImports = Record<string, ImportValue>;
10979
11034
  type ValueType = keyof ValueTypeMap;
11035
+ var JSTag: Tag;
10980
11036
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
10981
- function compile(bytes: BufferSource): Promise<Module>;
11037
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
10982
11038
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
10983
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
11039
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
10984
11040
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
10985
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11041
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
10986
11042
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
10987
11043
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
10988
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11044
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
10989
11045
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
10990
- function validate(bytes: BufferSource): boolean;
11046
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
10991
11047
  }
10992
11048
 
10993
11049
  /** 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/sharedworker",
3
- "version": "0.0.185",
3
+ "version": "0.0.186",
4
4
  "description": "Types for the global scope of Shared Workers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -6636,12 +6636,6 @@ interface ServiceWorkerRegistration extends EventTarget {
6636
6636
  readonly navigationPreload: NavigationPreloadManager;
6637
6637
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
6638
6638
  onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
6639
- /**
6640
- * 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.
6641
- *
6642
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager)
6643
- */
6644
- readonly pushManager: PushManager;
6645
6639
  /**
6646
6640
  * 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.
6647
6641
  *
@@ -10778,6 +10772,37 @@ declare namespace WebAssembly {
10778
10772
  (message?: string): CompileError;
10779
10773
  };
10780
10774
 
10775
+ /**
10776
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
10777
+ *
10778
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
10779
+ */
10780
+ interface Exception {
10781
+ /**
10782
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
10783
+ *
10784
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
10785
+ */
10786
+ readonly stack: string | undefined;
10787
+ /**
10788
+ * 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.
10789
+ *
10790
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
10791
+ */
10792
+ getArg(index: number): any;
10793
+ /**
10794
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
10795
+ *
10796
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
10797
+ */
10798
+ is(exceptionTag: Tag): boolean;
10799
+ }
10800
+
10801
+ var Exception: {
10802
+ prototype: Exception;
10803
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
10804
+ };
10805
+
10781
10806
  /**
10782
10807
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
10783
10808
  *
@@ -10838,7 +10863,7 @@ declare namespace WebAssembly {
10838
10863
  *
10839
10864
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
10840
10865
  */
10841
- grow(delta: number): number;
10866
+ grow(delta: AddressValue): AddressValue;
10842
10867
  }
10843
10868
 
10844
10869
  var Memory: {
@@ -10856,7 +10881,7 @@ declare namespace WebAssembly {
10856
10881
 
10857
10882
  var Module: {
10858
10883
  prototype: Module;
10859
- new(bytes: BufferSource): Module;
10884
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
10860
10885
  /**
10861
10886
  * 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.
10862
10887
  *
@@ -10897,25 +10922,25 @@ declare namespace WebAssembly {
10897
10922
  *
10898
10923
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
10899
10924
  */
10900
- readonly length: number;
10925
+ readonly length: AddressValue;
10901
10926
  /**
10902
10927
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
10903
10928
  *
10904
10929
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
10905
10930
  */
10906
- get(index: number): any;
10931
+ get(index: AddressValue): any;
10907
10932
  /**
10908
10933
  * 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.
10909
10934
  *
10910
10935
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
10911
10936
  */
10912
- grow(delta: number, value?: any): number;
10937
+ grow(delta: AddressValue, value?: any): AddressValue;
10913
10938
  /**
10914
10939
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
10915
10940
  *
10916
10941
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
10917
10942
  */
10918
- set(index: number, value?: any): void;
10943
+ set(index: AddressValue, value?: any): void;
10919
10944
  }
10920
10945
 
10921
10946
  var Table: {
@@ -10923,14 +10948,32 @@ declare namespace WebAssembly {
10923
10948
  new(descriptor: TableDescriptor, value?: any): Table;
10924
10949
  };
10925
10950
 
10951
+ /**
10952
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
10953
+ *
10954
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
10955
+ */
10956
+ interface Tag {
10957
+ }
10958
+
10959
+ var Tag: {
10960
+ prototype: Tag;
10961
+ new(type: TagType): Tag;
10962
+ };
10963
+
10964
+ interface ExceptionOptions {
10965
+ traceStack?: boolean;
10966
+ }
10967
+
10926
10968
  interface GlobalDescriptor<T extends ValueType = ValueType> {
10927
10969
  mutable?: boolean;
10928
10970
  value: T;
10929
10971
  }
10930
10972
 
10931
10973
  interface MemoryDescriptor {
10932
- initial: number;
10933
- maximum?: number;
10974
+ address?: AddressType;
10975
+ initial: AddressValue;
10976
+ maximum?: AddressValue;
10934
10977
  shared?: boolean;
10935
10978
  }
10936
10979
 
@@ -10946,9 +10989,14 @@ declare namespace WebAssembly {
10946
10989
  }
10947
10990
 
10948
10991
  interface TableDescriptor {
10992
+ address?: AddressType;
10949
10993
  element: TableKind;
10950
- initial: number;
10951
- maximum?: number;
10994
+ initial: AddressValue;
10995
+ maximum?: AddressValue;
10996
+ }
10997
+
10998
+ interface TagType {
10999
+ parameters: ValueType[];
10952
11000
  }
10953
11001
 
10954
11002
  interface ValueTypeMap {
@@ -10961,30 +11009,38 @@ declare namespace WebAssembly {
10961
11009
  v128: never;
10962
11010
  }
10963
11011
 
11012
+ interface WebAssemblyCompileOptions {
11013
+ builtins?: string[];
11014
+ importedStringConstants?: string | null;
11015
+ }
11016
+
10964
11017
  interface WebAssemblyInstantiatedSource {
10965
11018
  instance: Instance;
10966
11019
  module: Module;
10967
11020
  }
10968
11021
 
10969
- type ImportExportKind = "function" | "global" | "memory" | "table";
11022
+ type AddressType = "i32" | "i64";
11023
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
10970
11024
  type TableKind = "anyfunc" | "externref";
11025
+ type AddressValue = number;
10971
11026
  type ExportValue = Function | Global | Memory | Table;
10972
11027
  type Exports = Record<string, ExportValue>;
10973
11028
  type ImportValue = ExportValue | number;
10974
11029
  type Imports = Record<string, ModuleImports>;
10975
11030
  type ModuleImports = Record<string, ImportValue>;
10976
11031
  type ValueType = keyof ValueTypeMap;
11032
+ var JSTag: Tag;
10977
11033
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
10978
- function compile(bytes: BufferSource): Promise<Module>;
11034
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
10979
11035
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
10980
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
11036
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
10981
11037
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
10982
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11038
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
10983
11039
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
10984
11040
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
10985
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11041
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
10986
11042
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
10987
- function validate(bytes: BufferSource): boolean;
11043
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
10988
11044
  }
10989
11045
 
10990
11046
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
package/ts5.6/index.d.ts CHANGED
@@ -6636,12 +6636,6 @@ interface ServiceWorkerRegistration extends EventTarget {
6636
6636
  readonly navigationPreload: NavigationPreloadManager;
6637
6637
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
6638
6638
  onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
6639
- /**
6640
- * 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.
6641
- *
6642
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager)
6643
- */
6644
- readonly pushManager: PushManager;
6645
6639
  /**
6646
6640
  * 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.
6647
6641
  *
@@ -10778,6 +10772,37 @@ declare namespace WebAssembly {
10778
10772
  (message?: string): CompileError;
10779
10773
  };
10780
10774
 
10775
+ /**
10776
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
10777
+ *
10778
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
10779
+ */
10780
+ interface Exception {
10781
+ /**
10782
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
10783
+ *
10784
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
10785
+ */
10786
+ readonly stack: string | undefined;
10787
+ /**
10788
+ * 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.
10789
+ *
10790
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
10791
+ */
10792
+ getArg(index: number): any;
10793
+ /**
10794
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
10795
+ *
10796
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
10797
+ */
10798
+ is(exceptionTag: Tag): boolean;
10799
+ }
10800
+
10801
+ var Exception: {
10802
+ prototype: Exception;
10803
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
10804
+ };
10805
+
10781
10806
  /**
10782
10807
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
10783
10808
  *
@@ -10838,7 +10863,7 @@ declare namespace WebAssembly {
10838
10863
  *
10839
10864
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
10840
10865
  */
10841
- grow(delta: number): number;
10866
+ grow(delta: AddressValue): AddressValue;
10842
10867
  }
10843
10868
 
10844
10869
  var Memory: {
@@ -10856,7 +10881,7 @@ declare namespace WebAssembly {
10856
10881
 
10857
10882
  var Module: {
10858
10883
  prototype: Module;
10859
- new(bytes: BufferSource): Module;
10884
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
10860
10885
  /**
10861
10886
  * 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.
10862
10887
  *
@@ -10897,25 +10922,25 @@ declare namespace WebAssembly {
10897
10922
  *
10898
10923
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
10899
10924
  */
10900
- readonly length: number;
10925
+ readonly length: AddressValue;
10901
10926
  /**
10902
10927
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
10903
10928
  *
10904
10929
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
10905
10930
  */
10906
- get(index: number): any;
10931
+ get(index: AddressValue): any;
10907
10932
  /**
10908
10933
  * 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.
10909
10934
  *
10910
10935
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
10911
10936
  */
10912
- grow(delta: number, value?: any): number;
10937
+ grow(delta: AddressValue, value?: any): AddressValue;
10913
10938
  /**
10914
10939
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
10915
10940
  *
10916
10941
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
10917
10942
  */
10918
- set(index: number, value?: any): void;
10943
+ set(index: AddressValue, value?: any): void;
10919
10944
  }
10920
10945
 
10921
10946
  var Table: {
@@ -10923,14 +10948,32 @@ declare namespace WebAssembly {
10923
10948
  new(descriptor: TableDescriptor, value?: any): Table;
10924
10949
  };
10925
10950
 
10951
+ /**
10952
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
10953
+ *
10954
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
10955
+ */
10956
+ interface Tag {
10957
+ }
10958
+
10959
+ var Tag: {
10960
+ prototype: Tag;
10961
+ new(type: TagType): Tag;
10962
+ };
10963
+
10964
+ interface ExceptionOptions {
10965
+ traceStack?: boolean;
10966
+ }
10967
+
10926
10968
  interface GlobalDescriptor<T extends ValueType = ValueType> {
10927
10969
  mutable?: boolean;
10928
10970
  value: T;
10929
10971
  }
10930
10972
 
10931
10973
  interface MemoryDescriptor {
10932
- initial: number;
10933
- maximum?: number;
10974
+ address?: AddressType;
10975
+ initial: AddressValue;
10976
+ maximum?: AddressValue;
10934
10977
  shared?: boolean;
10935
10978
  }
10936
10979
 
@@ -10946,9 +10989,14 @@ declare namespace WebAssembly {
10946
10989
  }
10947
10990
 
10948
10991
  interface TableDescriptor {
10992
+ address?: AddressType;
10949
10993
  element: TableKind;
10950
- initial: number;
10951
- maximum?: number;
10994
+ initial: AddressValue;
10995
+ maximum?: AddressValue;
10996
+ }
10997
+
10998
+ interface TagType {
10999
+ parameters: ValueType[];
10952
11000
  }
10953
11001
 
10954
11002
  interface ValueTypeMap {
@@ -10961,30 +11009,38 @@ declare namespace WebAssembly {
10961
11009
  v128: never;
10962
11010
  }
10963
11011
 
11012
+ interface WebAssemblyCompileOptions {
11013
+ builtins?: string[];
11014
+ importedStringConstants?: string | null;
11015
+ }
11016
+
10964
11017
  interface WebAssemblyInstantiatedSource {
10965
11018
  instance: Instance;
10966
11019
  module: Module;
10967
11020
  }
10968
11021
 
10969
- type ImportExportKind = "function" | "global" | "memory" | "table";
11022
+ type AddressType = "i32" | "i64";
11023
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
10970
11024
  type TableKind = "anyfunc" | "externref";
11025
+ type AddressValue = number;
10971
11026
  type ExportValue = Function | Global | Memory | Table;
10972
11027
  type Exports = Record<string, ExportValue>;
10973
11028
  type ImportValue = ExportValue | number;
10974
11029
  type Imports = Record<string, ModuleImports>;
10975
11030
  type ModuleImports = Record<string, ImportValue>;
10976
11031
  type ValueType = keyof ValueTypeMap;
11032
+ var JSTag: Tag;
10977
11033
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
10978
- function compile(bytes: BufferSource): Promise<Module>;
11034
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
10979
11035
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
10980
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
11036
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
10981
11037
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
10982
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11038
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
10983
11039
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
10984
11040
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
10985
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11041
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
10986
11042
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
10987
- function validate(bytes: BufferSource): boolean;
11043
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
10988
11044
  }
10989
11045
 
10990
11046
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
package/ts5.9/index.d.ts CHANGED
@@ -6636,12 +6636,6 @@ interface ServiceWorkerRegistration extends EventTarget {
6636
6636
  readonly navigationPreload: NavigationPreloadManager;
6637
6637
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
6638
6638
  onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
6639
- /**
6640
- * 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.
6641
- *
6642
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager)
6643
- */
6644
- readonly pushManager: PushManager;
6645
6639
  /**
6646
6640
  * 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.
6647
6641
  *
@@ -10778,6 +10772,37 @@ declare namespace WebAssembly {
10778
10772
  (message?: string): CompileError;
10779
10773
  };
10780
10774
 
10775
+ /**
10776
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
10777
+ *
10778
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
10779
+ */
10780
+ interface Exception {
10781
+ /**
10782
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
10783
+ *
10784
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
10785
+ */
10786
+ readonly stack: string | undefined;
10787
+ /**
10788
+ * 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.
10789
+ *
10790
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
10791
+ */
10792
+ getArg(index: number): any;
10793
+ /**
10794
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
10795
+ *
10796
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
10797
+ */
10798
+ is(exceptionTag: Tag): boolean;
10799
+ }
10800
+
10801
+ var Exception: {
10802
+ prototype: Exception;
10803
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
10804
+ };
10805
+
10781
10806
  /**
10782
10807
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
10783
10808
  *
@@ -10838,7 +10863,7 @@ declare namespace WebAssembly {
10838
10863
  *
10839
10864
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
10840
10865
  */
10841
- grow(delta: number): number;
10866
+ grow(delta: AddressValue): AddressValue;
10842
10867
  }
10843
10868
 
10844
10869
  var Memory: {
@@ -10856,7 +10881,7 @@ declare namespace WebAssembly {
10856
10881
 
10857
10882
  var Module: {
10858
10883
  prototype: Module;
10859
- new(bytes: BufferSource): Module;
10884
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
10860
10885
  /**
10861
10886
  * 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.
10862
10887
  *
@@ -10897,25 +10922,25 @@ declare namespace WebAssembly {
10897
10922
  *
10898
10923
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
10899
10924
  */
10900
- readonly length: number;
10925
+ readonly length: AddressValue;
10901
10926
  /**
10902
10927
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
10903
10928
  *
10904
10929
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
10905
10930
  */
10906
- get(index: number): any;
10931
+ get(index: AddressValue): any;
10907
10932
  /**
10908
10933
  * 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.
10909
10934
  *
10910
10935
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
10911
10936
  */
10912
- grow(delta: number, value?: any): number;
10937
+ grow(delta: AddressValue, value?: any): AddressValue;
10913
10938
  /**
10914
10939
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
10915
10940
  *
10916
10941
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
10917
10942
  */
10918
- set(index: number, value?: any): void;
10943
+ set(index: AddressValue, value?: any): void;
10919
10944
  }
10920
10945
 
10921
10946
  var Table: {
@@ -10923,14 +10948,32 @@ declare namespace WebAssembly {
10923
10948
  new(descriptor: TableDescriptor, value?: any): Table;
10924
10949
  };
10925
10950
 
10951
+ /**
10952
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
10953
+ *
10954
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
10955
+ */
10956
+ interface Tag {
10957
+ }
10958
+
10959
+ var Tag: {
10960
+ prototype: Tag;
10961
+ new(type: TagType): Tag;
10962
+ };
10963
+
10964
+ interface ExceptionOptions {
10965
+ traceStack?: boolean;
10966
+ }
10967
+
10926
10968
  interface GlobalDescriptor<T extends ValueType = ValueType> {
10927
10969
  mutable?: boolean;
10928
10970
  value: T;
10929
10971
  }
10930
10972
 
10931
10973
  interface MemoryDescriptor {
10932
- initial: number;
10933
- maximum?: number;
10974
+ address?: AddressType;
10975
+ initial: AddressValue;
10976
+ maximum?: AddressValue;
10934
10977
  shared?: boolean;
10935
10978
  }
10936
10979
 
@@ -10946,9 +10989,14 @@ declare namespace WebAssembly {
10946
10989
  }
10947
10990
 
10948
10991
  interface TableDescriptor {
10992
+ address?: AddressType;
10949
10993
  element: TableKind;
10950
- initial: number;
10951
- maximum?: number;
10994
+ initial: AddressValue;
10995
+ maximum?: AddressValue;
10996
+ }
10997
+
10998
+ interface TagType {
10999
+ parameters: ValueType[];
10952
11000
  }
10953
11001
 
10954
11002
  interface ValueTypeMap {
@@ -10961,30 +11009,38 @@ declare namespace WebAssembly {
10961
11009
  v128: never;
10962
11010
  }
10963
11011
 
11012
+ interface WebAssemblyCompileOptions {
11013
+ builtins?: string[];
11014
+ importedStringConstants?: string | null;
11015
+ }
11016
+
10964
11017
  interface WebAssemblyInstantiatedSource {
10965
11018
  instance: Instance;
10966
11019
  module: Module;
10967
11020
  }
10968
11021
 
10969
- type ImportExportKind = "function" | "global" | "memory" | "table";
11022
+ type AddressType = "i32" | "i64";
11023
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
10970
11024
  type TableKind = "anyfunc" | "externref";
11025
+ type AddressValue = number;
10971
11026
  type ExportValue = Function | Global | Memory | Table;
10972
11027
  type Exports = Record<string, ExportValue>;
10973
11028
  type ImportValue = ExportValue | number;
10974
11029
  type Imports = Record<string, ModuleImports>;
10975
11030
  type ModuleImports = Record<string, ImportValue>;
10976
11031
  type ValueType = keyof ValueTypeMap;
11032
+ var JSTag: Tag;
10977
11033
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
10978
- function compile(bytes: BufferSource): Promise<Module>;
11034
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
10979
11035
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compileStreaming_static) */
10980
- function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
11036
+ function compileStreaming(source: Response | PromiseLike<Response>, options?: WebAssemblyCompileOptions): Promise<Module>;
10981
11037
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
10982
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11038
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
10983
11039
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
10984
11040
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiateStreaming_static) */
10985
- function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
11041
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
10986
11042
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
10987
- function validate(bytes: BufferSource): boolean;
11043
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
10988
11044
  }
10989
11045
 
10990
11046
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */