@types/audioworklet 0.0.85 → 0.0.87

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.85 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Faudioworklet%400.0.85.
31
+ You can read what changed in version 0.0.87 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Faudioworklet%400.0.87.
@@ -1,12 +1,2 @@
1
- /////////////////////////////
2
- /// AudioWorklet Async Iterable APIs
3
- /////////////////////////////
4
-
5
- interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
6
- [Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
7
- }
8
-
9
- interface ReadableStream<R = any> {
10
- [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
11
- values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
12
- }
1
+ // This file's contents are now included in the main types file.
2
+ // The file has been left for backward compatibility.
package/index.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  /// <reference path="./iterable.d.ts" />
2
2
  /// <reference path="./asynciterable.d.ts" />
3
3
 
4
+ /// <reference lib="es2015" />
5
+ /// <reference lib="es2018.asynciterable" />
6
+
4
7
  /////////////////////////////
5
8
  /// AudioWorklet APIs
6
9
  /////////////////////////////
@@ -1543,6 +1546,37 @@ declare namespace WebAssembly {
1543
1546
  (message?: string): CompileError;
1544
1547
  };
1545
1548
 
1549
+ /**
1550
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
1551
+ *
1552
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
1553
+ */
1554
+ interface Exception {
1555
+ /**
1556
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
1557
+ *
1558
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
1559
+ */
1560
+ readonly stack: string | undefined;
1561
+ /**
1562
+ * 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.
1563
+ *
1564
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
1565
+ */
1566
+ getArg(index: number): any;
1567
+ /**
1568
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
1569
+ *
1570
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
1571
+ */
1572
+ is(exceptionTag: Tag): boolean;
1573
+ }
1574
+
1575
+ var Exception: {
1576
+ prototype: Exception;
1577
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
1578
+ };
1579
+
1546
1580
  /**
1547
1581
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
1548
1582
  *
@@ -1603,7 +1637,7 @@ declare namespace WebAssembly {
1603
1637
  *
1604
1638
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
1605
1639
  */
1606
- grow(delta: number): number;
1640
+ grow(delta: AddressValue): AddressValue;
1607
1641
  }
1608
1642
 
1609
1643
  var Memory: {
@@ -1621,7 +1655,7 @@ declare namespace WebAssembly {
1621
1655
 
1622
1656
  var Module: {
1623
1657
  prototype: Module;
1624
- new(bytes: BufferSource): Module;
1658
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
1625
1659
  /**
1626
1660
  * 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.
1627
1661
  *
@@ -1662,25 +1696,25 @@ declare namespace WebAssembly {
1662
1696
  *
1663
1697
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
1664
1698
  */
1665
- readonly length: number;
1699
+ readonly length: AddressValue;
1666
1700
  /**
1667
1701
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
1668
1702
  *
1669
1703
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
1670
1704
  */
1671
- get(index: number): any;
1705
+ get(index: AddressValue): any;
1672
1706
  /**
1673
1707
  * 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.
1674
1708
  *
1675
1709
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
1676
1710
  */
1677
- grow(delta: number, value?: any): number;
1711
+ grow(delta: AddressValue, value?: any): AddressValue;
1678
1712
  /**
1679
1713
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
1680
1714
  *
1681
1715
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
1682
1716
  */
1683
- set(index: number, value?: any): void;
1717
+ set(index: AddressValue, value?: any): void;
1684
1718
  }
1685
1719
 
1686
1720
  var Table: {
@@ -1688,14 +1722,32 @@ declare namespace WebAssembly {
1688
1722
  new(descriptor: TableDescriptor, value?: any): Table;
1689
1723
  };
1690
1724
 
1725
+ /**
1726
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
1727
+ *
1728
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
1729
+ */
1730
+ interface Tag {
1731
+ }
1732
+
1733
+ var Tag: {
1734
+ prototype: Tag;
1735
+ new(type: TagType): Tag;
1736
+ };
1737
+
1738
+ interface ExceptionOptions {
1739
+ traceStack?: boolean;
1740
+ }
1741
+
1691
1742
  interface GlobalDescriptor<T extends ValueType = ValueType> {
1692
1743
  mutable?: boolean;
1693
1744
  value: T;
1694
1745
  }
1695
1746
 
1696
1747
  interface MemoryDescriptor {
1697
- initial: number;
1698
- maximum?: number;
1748
+ address?: AddressType;
1749
+ initial: AddressValue;
1750
+ maximum?: AddressValue;
1699
1751
  shared?: boolean;
1700
1752
  }
1701
1753
 
@@ -1711,9 +1763,14 @@ declare namespace WebAssembly {
1711
1763
  }
1712
1764
 
1713
1765
  interface TableDescriptor {
1766
+ address?: AddressType;
1714
1767
  element: TableKind;
1715
- initial: number;
1716
- maximum?: number;
1768
+ initial: AddressValue;
1769
+ maximum?: AddressValue;
1770
+ }
1771
+
1772
+ interface TagType {
1773
+ parameters: ValueType[];
1717
1774
  }
1718
1775
 
1719
1776
  interface ValueTypeMap {
@@ -1726,26 +1783,34 @@ declare namespace WebAssembly {
1726
1783
  v128: never;
1727
1784
  }
1728
1785
 
1786
+ interface WebAssemblyCompileOptions {
1787
+ builtins?: string[];
1788
+ importedStringConstants?: string | null;
1789
+ }
1790
+
1729
1791
  interface WebAssemblyInstantiatedSource {
1730
1792
  instance: Instance;
1731
1793
  module: Module;
1732
1794
  }
1733
1795
 
1734
- type ImportExportKind = "function" | "global" | "memory" | "table";
1796
+ type AddressType = "i32" | "i64";
1797
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
1735
1798
  type TableKind = "anyfunc" | "externref";
1799
+ type AddressValue = number;
1736
1800
  type ExportValue = Function | Global | Memory | Table;
1737
1801
  type Exports = Record<string, ExportValue>;
1738
1802
  type ImportValue = ExportValue | number;
1739
1803
  type Imports = Record<string, ModuleImports>;
1740
1804
  type ModuleImports = Record<string, ImportValue>;
1741
1805
  type ValueType = keyof ValueTypeMap;
1806
+ var JSTag: Tag;
1742
1807
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
1743
- function compile(bytes: BufferSource): Promise<Module>;
1808
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
1744
1809
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
1745
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
1810
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
1746
1811
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
1747
1812
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
1748
- function validate(bytes: BufferSource): boolean;
1813
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
1749
1814
  }
1750
1815
 
1751
1816
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
@@ -1958,3 +2023,41 @@ type Transferable = MessagePort | ReadableStream | WritableStream | TransformStr
1958
2023
  type CompressionFormat = "deflate" | "deflate-raw" | "gzip";
1959
2024
  type ReadableStreamReaderMode = "byob";
1960
2025
  type ReadableStreamType = "bytes";
2026
+
2027
+
2028
+ /////////////////////////////
2029
+ /// AudioWorklet Iterable APIs
2030
+ /////////////////////////////
2031
+
2032
+ interface MessageEvent<T = any> {
2033
+ /** @deprecated */
2034
+ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void;
2035
+ }
2036
+
2037
+ interface URLSearchParamsIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
2038
+ [Symbol.iterator](): URLSearchParamsIterator<T>;
2039
+ }
2040
+
2041
+ interface URLSearchParams {
2042
+ [Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
2043
+ /** Returns an array of key, value pairs for every entry in the search params. */
2044
+ entries(): URLSearchParamsIterator<[string, string]>;
2045
+ /** Returns a list of keys in the search params. */
2046
+ keys(): URLSearchParamsIterator<string>;
2047
+ /** Returns a list of values in the search params. */
2048
+ values(): URLSearchParamsIterator<string>;
2049
+ }
2050
+
2051
+
2052
+ /////////////////////////////
2053
+ /// AudioWorklet Async Iterable APIs
2054
+ /////////////////////////////
2055
+
2056
+ interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
2057
+ [Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
2058
+ }
2059
+
2060
+ interface ReadableStream<R = any> {
2061
+ [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
2062
+ values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
2063
+ }
package/iterable.d.ts CHANGED
@@ -1,22 +1,2 @@
1
- /////////////////////////////
2
- /// AudioWorklet Iterable APIs
3
- /////////////////////////////
4
-
5
- interface MessageEvent<T = any> {
6
- /** @deprecated */
7
- initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
8
- }
9
-
10
- interface URLSearchParamsIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
11
- [Symbol.iterator](): URLSearchParamsIterator<T>;
12
- }
13
-
14
- interface URLSearchParams {
15
- [Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
16
- /** Returns an array of key, value pairs for every entry in the search params. */
17
- entries(): URLSearchParamsIterator<[string, string]>;
18
- /** Returns a list of keys in the search params. */
19
- keys(): URLSearchParamsIterator<string>;
20
- /** Returns a list of values in the search params. */
21
- values(): URLSearchParamsIterator<string>;
22
- }
1
+ // This file's contents are now included in the main types file.
2
+ // The file has been left for backward compatibility.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/audioworklet",
3
- "version": "0.0.85",
3
+ "version": "0.0.87",
4
4
  "description": "Types for the global scope of Audio Worklets",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
@@ -20,6 +20,11 @@
20
20
  "*": [
21
21
  "ts5.6/*"
22
22
  ]
23
+ },
24
+ "<=5.9": {
25
+ "*": [
26
+ "ts5.9/*"
27
+ ]
23
28
  }
24
29
  },
25
30
  "scripts": {},
package/ts5.5/index.d.ts CHANGED
@@ -1543,6 +1543,37 @@ declare namespace WebAssembly {
1543
1543
  (message?: string): CompileError;
1544
1544
  };
1545
1545
 
1546
+ /**
1547
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
1548
+ *
1549
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
1550
+ */
1551
+ interface Exception {
1552
+ /**
1553
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
1554
+ *
1555
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
1556
+ */
1557
+ readonly stack: string | undefined;
1558
+ /**
1559
+ * 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.
1560
+ *
1561
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
1562
+ */
1563
+ getArg(index: number): any;
1564
+ /**
1565
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
1566
+ *
1567
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
1568
+ */
1569
+ is(exceptionTag: Tag): boolean;
1570
+ }
1571
+
1572
+ var Exception: {
1573
+ prototype: Exception;
1574
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
1575
+ };
1576
+
1546
1577
  /**
1547
1578
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
1548
1579
  *
@@ -1603,7 +1634,7 @@ declare namespace WebAssembly {
1603
1634
  *
1604
1635
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
1605
1636
  */
1606
- grow(delta: number): number;
1637
+ grow(delta: AddressValue): AddressValue;
1607
1638
  }
1608
1639
 
1609
1640
  var Memory: {
@@ -1621,7 +1652,7 @@ declare namespace WebAssembly {
1621
1652
 
1622
1653
  var Module: {
1623
1654
  prototype: Module;
1624
- new(bytes: BufferSource): Module;
1655
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
1625
1656
  /**
1626
1657
  * 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.
1627
1658
  *
@@ -1662,25 +1693,25 @@ declare namespace WebAssembly {
1662
1693
  *
1663
1694
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
1664
1695
  */
1665
- readonly length: number;
1696
+ readonly length: AddressValue;
1666
1697
  /**
1667
1698
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
1668
1699
  *
1669
1700
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
1670
1701
  */
1671
- get(index: number): any;
1702
+ get(index: AddressValue): any;
1672
1703
  /**
1673
1704
  * 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.
1674
1705
  *
1675
1706
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
1676
1707
  */
1677
- grow(delta: number, value?: any): number;
1708
+ grow(delta: AddressValue, value?: any): AddressValue;
1678
1709
  /**
1679
1710
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
1680
1711
  *
1681
1712
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
1682
1713
  */
1683
- set(index: number, value?: any): void;
1714
+ set(index: AddressValue, value?: any): void;
1684
1715
  }
1685
1716
 
1686
1717
  var Table: {
@@ -1688,14 +1719,32 @@ declare namespace WebAssembly {
1688
1719
  new(descriptor: TableDescriptor, value?: any): Table;
1689
1720
  };
1690
1721
 
1722
+ /**
1723
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
1724
+ *
1725
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
1726
+ */
1727
+ interface Tag {
1728
+ }
1729
+
1730
+ var Tag: {
1731
+ prototype: Tag;
1732
+ new(type: TagType): Tag;
1733
+ };
1734
+
1735
+ interface ExceptionOptions {
1736
+ traceStack?: boolean;
1737
+ }
1738
+
1691
1739
  interface GlobalDescriptor<T extends ValueType = ValueType> {
1692
1740
  mutable?: boolean;
1693
1741
  value: T;
1694
1742
  }
1695
1743
 
1696
1744
  interface MemoryDescriptor {
1697
- initial: number;
1698
- maximum?: number;
1745
+ address?: AddressType;
1746
+ initial: AddressValue;
1747
+ maximum?: AddressValue;
1699
1748
  shared?: boolean;
1700
1749
  }
1701
1750
 
@@ -1711,9 +1760,14 @@ declare namespace WebAssembly {
1711
1760
  }
1712
1761
 
1713
1762
  interface TableDescriptor {
1763
+ address?: AddressType;
1714
1764
  element: TableKind;
1715
- initial: number;
1716
- maximum?: number;
1765
+ initial: AddressValue;
1766
+ maximum?: AddressValue;
1767
+ }
1768
+
1769
+ interface TagType {
1770
+ parameters: ValueType[];
1717
1771
  }
1718
1772
 
1719
1773
  interface ValueTypeMap {
@@ -1726,26 +1780,34 @@ declare namespace WebAssembly {
1726
1780
  v128: never;
1727
1781
  }
1728
1782
 
1783
+ interface WebAssemblyCompileOptions {
1784
+ builtins?: string[];
1785
+ importedStringConstants?: string | null;
1786
+ }
1787
+
1729
1788
  interface WebAssemblyInstantiatedSource {
1730
1789
  instance: Instance;
1731
1790
  module: Module;
1732
1791
  }
1733
1792
 
1734
- type ImportExportKind = "function" | "global" | "memory" | "table";
1793
+ type AddressType = "i32" | "i64";
1794
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
1735
1795
  type TableKind = "anyfunc" | "externref";
1796
+ type AddressValue = number;
1736
1797
  type ExportValue = Function | Global | Memory | Table;
1737
1798
  type Exports = Record<string, ExportValue>;
1738
1799
  type ImportValue = ExportValue | number;
1739
1800
  type Imports = Record<string, ModuleImports>;
1740
1801
  type ModuleImports = Record<string, ImportValue>;
1741
1802
  type ValueType = keyof ValueTypeMap;
1803
+ var JSTag: Tag;
1742
1804
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
1743
- function compile(bytes: BufferSource): Promise<Module>;
1805
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
1744
1806
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
1745
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
1807
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
1746
1808
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
1747
1809
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
1748
- function validate(bytes: BufferSource): boolean;
1810
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
1749
1811
  }
1750
1812
 
1751
1813
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
package/ts5.6/index.d.ts CHANGED
@@ -1543,6 +1543,37 @@ declare namespace WebAssembly {
1543
1543
  (message?: string): CompileError;
1544
1544
  };
1545
1545
 
1546
+ /**
1547
+ * The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
1548
+ *
1549
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
1550
+ */
1551
+ interface Exception {
1552
+ /**
1553
+ * The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
1554
+ *
1555
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
1556
+ */
1557
+ readonly stack: string | undefined;
1558
+ /**
1559
+ * 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.
1560
+ *
1561
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
1562
+ */
1563
+ getArg(index: number): any;
1564
+ /**
1565
+ * The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
1566
+ *
1567
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
1568
+ */
1569
+ is(exceptionTag: Tag): boolean;
1570
+ }
1571
+
1572
+ var Exception: {
1573
+ prototype: Exception;
1574
+ new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
1575
+ };
1576
+
1546
1577
  /**
1547
1578
  * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
1548
1579
  *
@@ -1603,7 +1634,7 @@ declare namespace WebAssembly {
1603
1634
  *
1604
1635
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
1605
1636
  */
1606
- grow(delta: number): number;
1637
+ grow(delta: AddressValue): AddressValue;
1607
1638
  }
1608
1639
 
1609
1640
  var Memory: {
@@ -1621,7 +1652,7 @@ declare namespace WebAssembly {
1621
1652
 
1622
1653
  var Module: {
1623
1654
  prototype: Module;
1624
- new(bytes: BufferSource): Module;
1655
+ new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
1625
1656
  /**
1626
1657
  * 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.
1627
1658
  *
@@ -1662,25 +1693,25 @@ declare namespace WebAssembly {
1662
1693
  *
1663
1694
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
1664
1695
  */
1665
- readonly length: number;
1696
+ readonly length: AddressValue;
1666
1697
  /**
1667
1698
  * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
1668
1699
  *
1669
1700
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
1670
1701
  */
1671
- get(index: number): any;
1702
+ get(index: AddressValue): any;
1672
1703
  /**
1673
1704
  * 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.
1674
1705
  *
1675
1706
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
1676
1707
  */
1677
- grow(delta: number, value?: any): number;
1708
+ grow(delta: AddressValue, value?: any): AddressValue;
1678
1709
  /**
1679
1710
  * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
1680
1711
  *
1681
1712
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
1682
1713
  */
1683
- set(index: number, value?: any): void;
1714
+ set(index: AddressValue, value?: any): void;
1684
1715
  }
1685
1716
 
1686
1717
  var Table: {
@@ -1688,14 +1719,32 @@ declare namespace WebAssembly {
1688
1719
  new(descriptor: TableDescriptor, value?: any): Table;
1689
1720
  };
1690
1721
 
1722
+ /**
1723
+ * The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
1724
+ *
1725
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
1726
+ */
1727
+ interface Tag {
1728
+ }
1729
+
1730
+ var Tag: {
1731
+ prototype: Tag;
1732
+ new(type: TagType): Tag;
1733
+ };
1734
+
1735
+ interface ExceptionOptions {
1736
+ traceStack?: boolean;
1737
+ }
1738
+
1691
1739
  interface GlobalDescriptor<T extends ValueType = ValueType> {
1692
1740
  mutable?: boolean;
1693
1741
  value: T;
1694
1742
  }
1695
1743
 
1696
1744
  interface MemoryDescriptor {
1697
- initial: number;
1698
- maximum?: number;
1745
+ address?: AddressType;
1746
+ initial: AddressValue;
1747
+ maximum?: AddressValue;
1699
1748
  shared?: boolean;
1700
1749
  }
1701
1750
 
@@ -1711,9 +1760,14 @@ declare namespace WebAssembly {
1711
1760
  }
1712
1761
 
1713
1762
  interface TableDescriptor {
1763
+ address?: AddressType;
1714
1764
  element: TableKind;
1715
- initial: number;
1716
- maximum?: number;
1765
+ initial: AddressValue;
1766
+ maximum?: AddressValue;
1767
+ }
1768
+
1769
+ interface TagType {
1770
+ parameters: ValueType[];
1717
1771
  }
1718
1772
 
1719
1773
  interface ValueTypeMap {
@@ -1726,26 +1780,34 @@ declare namespace WebAssembly {
1726
1780
  v128: never;
1727
1781
  }
1728
1782
 
1783
+ interface WebAssemblyCompileOptions {
1784
+ builtins?: string[];
1785
+ importedStringConstants?: string | null;
1786
+ }
1787
+
1729
1788
  interface WebAssemblyInstantiatedSource {
1730
1789
  instance: Instance;
1731
1790
  module: Module;
1732
1791
  }
1733
1792
 
1734
- type ImportExportKind = "function" | "global" | "memory" | "table";
1793
+ type AddressType = "i32" | "i64";
1794
+ type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
1735
1795
  type TableKind = "anyfunc" | "externref";
1796
+ type AddressValue = number;
1736
1797
  type ExportValue = Function | Global | Memory | Table;
1737
1798
  type Exports = Record<string, ExportValue>;
1738
1799
  type ImportValue = ExportValue | number;
1739
1800
  type Imports = Record<string, ModuleImports>;
1740
1801
  type ModuleImports = Record<string, ImportValue>;
1741
1802
  type ValueType = keyof ValueTypeMap;
1803
+ var JSTag: Tag;
1742
1804
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
1743
- function compile(bytes: BufferSource): Promise<Module>;
1805
+ function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
1744
1806
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
1745
- function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
1807
+ function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
1746
1808
  function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
1747
1809
  /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
1748
- function validate(bytes: BufferSource): boolean;
1810
+ function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
1749
1811
  }
1750
1812
 
1751
1813
  /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
@@ -0,0 +1,12 @@
1
+ /////////////////////////////
2
+ /// AudioWorklet Async Iterable APIs
3
+ /////////////////////////////
4
+
5
+ interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
6
+ [Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
7
+ }
8
+
9
+ interface ReadableStream<R = any> {
10
+ [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
11
+ values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
12
+ }