@types/audioworklet 0.0.86 → 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 +1 -1
- package/index.d.ts +76 -14
- package/package.json +1 -1
- package/ts5.5/index.d.ts +76 -14
- package/ts5.6/index.d.ts +76 -14
- package/ts5.9/index.d.ts +76 -14
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.
|
|
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.
|
package/index.d.ts
CHANGED
|
@@ -1546,6 +1546,37 @@ declare namespace WebAssembly {
|
|
|
1546
1546
|
(message?: string): CompileError;
|
|
1547
1547
|
};
|
|
1548
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
|
+
|
|
1549
1580
|
/**
|
|
1550
1581
|
* A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
|
|
1551
1582
|
*
|
|
@@ -1606,7 +1637,7 @@ declare namespace WebAssembly {
|
|
|
1606
1637
|
*
|
|
1607
1638
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
|
|
1608
1639
|
*/
|
|
1609
|
-
grow(delta:
|
|
1640
|
+
grow(delta: AddressValue): AddressValue;
|
|
1610
1641
|
}
|
|
1611
1642
|
|
|
1612
1643
|
var Memory: {
|
|
@@ -1624,7 +1655,7 @@ declare namespace WebAssembly {
|
|
|
1624
1655
|
|
|
1625
1656
|
var Module: {
|
|
1626
1657
|
prototype: Module;
|
|
1627
|
-
new(bytes: BufferSource): Module;
|
|
1658
|
+
new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
|
|
1628
1659
|
/**
|
|
1629
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.
|
|
1630
1661
|
*
|
|
@@ -1665,25 +1696,25 @@ declare namespace WebAssembly {
|
|
|
1665
1696
|
*
|
|
1666
1697
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
|
|
1667
1698
|
*/
|
|
1668
|
-
readonly length:
|
|
1699
|
+
readonly length: AddressValue;
|
|
1669
1700
|
/**
|
|
1670
1701
|
* The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
|
|
1671
1702
|
*
|
|
1672
1703
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
|
|
1673
1704
|
*/
|
|
1674
|
-
get(index:
|
|
1705
|
+
get(index: AddressValue): any;
|
|
1675
1706
|
/**
|
|
1676
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.
|
|
1677
1708
|
*
|
|
1678
1709
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
|
|
1679
1710
|
*/
|
|
1680
|
-
grow(delta:
|
|
1711
|
+
grow(delta: AddressValue, value?: any): AddressValue;
|
|
1681
1712
|
/**
|
|
1682
1713
|
* The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
|
|
1683
1714
|
*
|
|
1684
1715
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
|
|
1685
1716
|
*/
|
|
1686
|
-
set(index:
|
|
1717
|
+
set(index: AddressValue, value?: any): void;
|
|
1687
1718
|
}
|
|
1688
1719
|
|
|
1689
1720
|
var Table: {
|
|
@@ -1691,14 +1722,32 @@ declare namespace WebAssembly {
|
|
|
1691
1722
|
new(descriptor: TableDescriptor, value?: any): Table;
|
|
1692
1723
|
};
|
|
1693
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
|
+
|
|
1694
1742
|
interface GlobalDescriptor<T extends ValueType = ValueType> {
|
|
1695
1743
|
mutable?: boolean;
|
|
1696
1744
|
value: T;
|
|
1697
1745
|
}
|
|
1698
1746
|
|
|
1699
1747
|
interface MemoryDescriptor {
|
|
1700
|
-
|
|
1701
|
-
|
|
1748
|
+
address?: AddressType;
|
|
1749
|
+
initial: AddressValue;
|
|
1750
|
+
maximum?: AddressValue;
|
|
1702
1751
|
shared?: boolean;
|
|
1703
1752
|
}
|
|
1704
1753
|
|
|
@@ -1714,9 +1763,14 @@ declare namespace WebAssembly {
|
|
|
1714
1763
|
}
|
|
1715
1764
|
|
|
1716
1765
|
interface TableDescriptor {
|
|
1766
|
+
address?: AddressType;
|
|
1717
1767
|
element: TableKind;
|
|
1718
|
-
initial:
|
|
1719
|
-
maximum?:
|
|
1768
|
+
initial: AddressValue;
|
|
1769
|
+
maximum?: AddressValue;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
interface TagType {
|
|
1773
|
+
parameters: ValueType[];
|
|
1720
1774
|
}
|
|
1721
1775
|
|
|
1722
1776
|
interface ValueTypeMap {
|
|
@@ -1729,26 +1783,34 @@ declare namespace WebAssembly {
|
|
|
1729
1783
|
v128: never;
|
|
1730
1784
|
}
|
|
1731
1785
|
|
|
1786
|
+
interface WebAssemblyCompileOptions {
|
|
1787
|
+
builtins?: string[];
|
|
1788
|
+
importedStringConstants?: string | null;
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1732
1791
|
interface WebAssemblyInstantiatedSource {
|
|
1733
1792
|
instance: Instance;
|
|
1734
1793
|
module: Module;
|
|
1735
1794
|
}
|
|
1736
1795
|
|
|
1737
|
-
type
|
|
1796
|
+
type AddressType = "i32" | "i64";
|
|
1797
|
+
type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
|
|
1738
1798
|
type TableKind = "anyfunc" | "externref";
|
|
1799
|
+
type AddressValue = number;
|
|
1739
1800
|
type ExportValue = Function | Global | Memory | Table;
|
|
1740
1801
|
type Exports = Record<string, ExportValue>;
|
|
1741
1802
|
type ImportValue = ExportValue | number;
|
|
1742
1803
|
type Imports = Record<string, ModuleImports>;
|
|
1743
1804
|
type ModuleImports = Record<string, ImportValue>;
|
|
1744
1805
|
type ValueType = keyof ValueTypeMap;
|
|
1806
|
+
var JSTag: Tag;
|
|
1745
1807
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
|
|
1746
|
-
function compile(bytes: BufferSource): Promise<Module>;
|
|
1808
|
+
function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
|
|
1747
1809
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
|
|
1748
|
-
function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
|
|
1810
|
+
function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
|
|
1749
1811
|
function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
|
|
1750
1812
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
|
|
1751
|
-
function validate(bytes: BufferSource): boolean;
|
|
1813
|
+
function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
|
|
1752
1814
|
}
|
|
1753
1815
|
|
|
1754
1816
|
/** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
|
package/package.json
CHANGED
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
1698
|
-
|
|
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:
|
|
1716
|
-
maximum?:
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
1698
|
-
|
|
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:
|
|
1716
|
-
maximum?:
|
|
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
|
|
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.9/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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
1698
|
-
|
|
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:
|
|
1716
|
-
maximum?:
|
|
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
|
|
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). */
|