@types/audioworklet 0.0.86 → 0.0.88
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 +81 -15
- package/package.json +1 -1
- package/ts5.5/index.d.ts +81 -15
- package/ts5.6/index.d.ts +81 -15
- package/ts5.9/index.d.ts +81 -15
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.88 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Faudioworklet%400.0.88.
|
package/index.d.ts
CHANGED
|
@@ -63,6 +63,10 @@ interface QueuingStrategyInit {
|
|
|
63
63
|
highWaterMark: number;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
interface ReadableStreamBYOBReaderReadOptions {
|
|
67
|
+
min?: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
66
70
|
interface ReadableStreamGetReaderOptions {
|
|
67
71
|
/**
|
|
68
72
|
* Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
|
|
@@ -958,7 +962,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
|
|
|
958
962
|
*
|
|
959
963
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
|
|
960
964
|
*/
|
|
961
|
-
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
|
|
965
|
+
read<T extends ArrayBufferView>(view: T, options?: ReadableStreamBYOBReaderReadOptions): Promise<ReadableStreamReadResult<T>>;
|
|
962
966
|
/**
|
|
963
967
|
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
|
|
964
968
|
*
|
|
@@ -1546,6 +1550,37 @@ declare namespace WebAssembly {
|
|
|
1546
1550
|
(message?: string): CompileError;
|
|
1547
1551
|
};
|
|
1548
1552
|
|
|
1553
|
+
/**
|
|
1554
|
+
* The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
|
|
1555
|
+
*
|
|
1556
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
|
|
1557
|
+
*/
|
|
1558
|
+
interface Exception {
|
|
1559
|
+
/**
|
|
1560
|
+
* The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
|
|
1561
|
+
*
|
|
1562
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
|
|
1563
|
+
*/
|
|
1564
|
+
readonly stack: string | undefined;
|
|
1565
|
+
/**
|
|
1566
|
+
* 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.
|
|
1567
|
+
*
|
|
1568
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
|
|
1569
|
+
*/
|
|
1570
|
+
getArg(index: number): any;
|
|
1571
|
+
/**
|
|
1572
|
+
* The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
|
|
1573
|
+
*
|
|
1574
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
|
|
1575
|
+
*/
|
|
1576
|
+
is(exceptionTag: Tag): boolean;
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
var Exception: {
|
|
1580
|
+
prototype: Exception;
|
|
1581
|
+
new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
|
|
1582
|
+
};
|
|
1583
|
+
|
|
1549
1584
|
/**
|
|
1550
1585
|
* A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
|
|
1551
1586
|
*
|
|
@@ -1606,7 +1641,7 @@ declare namespace WebAssembly {
|
|
|
1606
1641
|
*
|
|
1607
1642
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
|
|
1608
1643
|
*/
|
|
1609
|
-
grow(delta:
|
|
1644
|
+
grow(delta: AddressValue): AddressValue;
|
|
1610
1645
|
}
|
|
1611
1646
|
|
|
1612
1647
|
var Memory: {
|
|
@@ -1624,7 +1659,7 @@ declare namespace WebAssembly {
|
|
|
1624
1659
|
|
|
1625
1660
|
var Module: {
|
|
1626
1661
|
prototype: Module;
|
|
1627
|
-
new(bytes: BufferSource): Module;
|
|
1662
|
+
new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
|
|
1628
1663
|
/**
|
|
1629
1664
|
* 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
1665
|
*
|
|
@@ -1665,25 +1700,25 @@ declare namespace WebAssembly {
|
|
|
1665
1700
|
*
|
|
1666
1701
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
|
|
1667
1702
|
*/
|
|
1668
|
-
readonly length:
|
|
1703
|
+
readonly length: AddressValue;
|
|
1669
1704
|
/**
|
|
1670
1705
|
* The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
|
|
1671
1706
|
*
|
|
1672
1707
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
|
|
1673
1708
|
*/
|
|
1674
|
-
get(index:
|
|
1709
|
+
get(index: AddressValue): any;
|
|
1675
1710
|
/**
|
|
1676
1711
|
* 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
1712
|
*
|
|
1678
1713
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
|
|
1679
1714
|
*/
|
|
1680
|
-
grow(delta:
|
|
1715
|
+
grow(delta: AddressValue, value?: any): AddressValue;
|
|
1681
1716
|
/**
|
|
1682
1717
|
* The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
|
|
1683
1718
|
*
|
|
1684
1719
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
|
|
1685
1720
|
*/
|
|
1686
|
-
set(index:
|
|
1721
|
+
set(index: AddressValue, value?: any): void;
|
|
1687
1722
|
}
|
|
1688
1723
|
|
|
1689
1724
|
var Table: {
|
|
@@ -1691,14 +1726,32 @@ declare namespace WebAssembly {
|
|
|
1691
1726
|
new(descriptor: TableDescriptor, value?: any): Table;
|
|
1692
1727
|
};
|
|
1693
1728
|
|
|
1729
|
+
/**
|
|
1730
|
+
* The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
|
|
1731
|
+
*
|
|
1732
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
|
|
1733
|
+
*/
|
|
1734
|
+
interface Tag {
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
var Tag: {
|
|
1738
|
+
prototype: Tag;
|
|
1739
|
+
new(type: TagType): Tag;
|
|
1740
|
+
};
|
|
1741
|
+
|
|
1742
|
+
interface ExceptionOptions {
|
|
1743
|
+
traceStack?: boolean;
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1694
1746
|
interface GlobalDescriptor<T extends ValueType = ValueType> {
|
|
1695
1747
|
mutable?: boolean;
|
|
1696
1748
|
value: T;
|
|
1697
1749
|
}
|
|
1698
1750
|
|
|
1699
1751
|
interface MemoryDescriptor {
|
|
1700
|
-
|
|
1701
|
-
|
|
1752
|
+
address?: AddressType;
|
|
1753
|
+
initial: AddressValue;
|
|
1754
|
+
maximum?: AddressValue;
|
|
1702
1755
|
shared?: boolean;
|
|
1703
1756
|
}
|
|
1704
1757
|
|
|
@@ -1714,9 +1767,14 @@ declare namespace WebAssembly {
|
|
|
1714
1767
|
}
|
|
1715
1768
|
|
|
1716
1769
|
interface TableDescriptor {
|
|
1770
|
+
address?: AddressType;
|
|
1717
1771
|
element: TableKind;
|
|
1718
|
-
initial:
|
|
1719
|
-
maximum?:
|
|
1772
|
+
initial: AddressValue;
|
|
1773
|
+
maximum?: AddressValue;
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
interface TagType {
|
|
1777
|
+
parameters: ValueType[];
|
|
1720
1778
|
}
|
|
1721
1779
|
|
|
1722
1780
|
interface ValueTypeMap {
|
|
@@ -1729,26 +1787,34 @@ declare namespace WebAssembly {
|
|
|
1729
1787
|
v128: never;
|
|
1730
1788
|
}
|
|
1731
1789
|
|
|
1790
|
+
interface WebAssemblyCompileOptions {
|
|
1791
|
+
builtins?: string[];
|
|
1792
|
+
importedStringConstants?: string | null;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1732
1795
|
interface WebAssemblyInstantiatedSource {
|
|
1733
1796
|
instance: Instance;
|
|
1734
1797
|
module: Module;
|
|
1735
1798
|
}
|
|
1736
1799
|
|
|
1737
|
-
type
|
|
1800
|
+
type AddressType = "i32" | "i64";
|
|
1801
|
+
type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
|
|
1738
1802
|
type TableKind = "anyfunc" | "externref";
|
|
1803
|
+
type AddressValue = number;
|
|
1739
1804
|
type ExportValue = Function | Global | Memory | Table;
|
|
1740
1805
|
type Exports = Record<string, ExportValue>;
|
|
1741
1806
|
type ImportValue = ExportValue | number;
|
|
1742
1807
|
type Imports = Record<string, ModuleImports>;
|
|
1743
1808
|
type ModuleImports = Record<string, ImportValue>;
|
|
1744
1809
|
type ValueType = keyof ValueTypeMap;
|
|
1810
|
+
var JSTag: Tag;
|
|
1745
1811
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
|
|
1746
|
-
function compile(bytes: BufferSource): Promise<Module>;
|
|
1812
|
+
function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
|
|
1747
1813
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
|
|
1748
|
-
function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
|
|
1814
|
+
function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
|
|
1749
1815
|
function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
|
|
1750
1816
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
|
|
1751
|
-
function validate(bytes: BufferSource): boolean;
|
|
1817
|
+
function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
|
|
1752
1818
|
}
|
|
1753
1819
|
|
|
1754
1820
|
/** 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
|
@@ -60,6 +60,10 @@ interface QueuingStrategyInit {
|
|
|
60
60
|
highWaterMark: number;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
interface ReadableStreamBYOBReaderReadOptions {
|
|
64
|
+
min?: number;
|
|
65
|
+
}
|
|
66
|
+
|
|
63
67
|
interface ReadableStreamGetReaderOptions {
|
|
64
68
|
/**
|
|
65
69
|
* Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
|
|
@@ -955,7 +959,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
|
|
|
955
959
|
*
|
|
956
960
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
|
|
957
961
|
*/
|
|
958
|
-
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
|
|
962
|
+
read<T extends ArrayBufferView>(view: T, options?: ReadableStreamBYOBReaderReadOptions): Promise<ReadableStreamReadResult<T>>;
|
|
959
963
|
/**
|
|
960
964
|
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
|
|
961
965
|
*
|
|
@@ -1543,6 +1547,37 @@ declare namespace WebAssembly {
|
|
|
1543
1547
|
(message?: string): CompileError;
|
|
1544
1548
|
};
|
|
1545
1549
|
|
|
1550
|
+
/**
|
|
1551
|
+
* The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
|
|
1552
|
+
*
|
|
1553
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
|
|
1554
|
+
*/
|
|
1555
|
+
interface Exception {
|
|
1556
|
+
/**
|
|
1557
|
+
* The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
|
|
1558
|
+
*
|
|
1559
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
|
|
1560
|
+
*/
|
|
1561
|
+
readonly stack: string | undefined;
|
|
1562
|
+
/**
|
|
1563
|
+
* 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.
|
|
1564
|
+
*
|
|
1565
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
|
|
1566
|
+
*/
|
|
1567
|
+
getArg(index: number): any;
|
|
1568
|
+
/**
|
|
1569
|
+
* The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
|
|
1570
|
+
*
|
|
1571
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
|
|
1572
|
+
*/
|
|
1573
|
+
is(exceptionTag: Tag): boolean;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
var Exception: {
|
|
1577
|
+
prototype: Exception;
|
|
1578
|
+
new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
|
|
1579
|
+
};
|
|
1580
|
+
|
|
1546
1581
|
/**
|
|
1547
1582
|
* A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
|
|
1548
1583
|
*
|
|
@@ -1603,7 +1638,7 @@ declare namespace WebAssembly {
|
|
|
1603
1638
|
*
|
|
1604
1639
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
|
|
1605
1640
|
*/
|
|
1606
|
-
grow(delta:
|
|
1641
|
+
grow(delta: AddressValue): AddressValue;
|
|
1607
1642
|
}
|
|
1608
1643
|
|
|
1609
1644
|
var Memory: {
|
|
@@ -1621,7 +1656,7 @@ declare namespace WebAssembly {
|
|
|
1621
1656
|
|
|
1622
1657
|
var Module: {
|
|
1623
1658
|
prototype: Module;
|
|
1624
|
-
new(bytes: BufferSource): Module;
|
|
1659
|
+
new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
|
|
1625
1660
|
/**
|
|
1626
1661
|
* 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
1662
|
*
|
|
@@ -1662,25 +1697,25 @@ declare namespace WebAssembly {
|
|
|
1662
1697
|
*
|
|
1663
1698
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
|
|
1664
1699
|
*/
|
|
1665
|
-
readonly length:
|
|
1700
|
+
readonly length: AddressValue;
|
|
1666
1701
|
/**
|
|
1667
1702
|
* The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
|
|
1668
1703
|
*
|
|
1669
1704
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
|
|
1670
1705
|
*/
|
|
1671
|
-
get(index:
|
|
1706
|
+
get(index: AddressValue): any;
|
|
1672
1707
|
/**
|
|
1673
1708
|
* 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
1709
|
*
|
|
1675
1710
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
|
|
1676
1711
|
*/
|
|
1677
|
-
grow(delta:
|
|
1712
|
+
grow(delta: AddressValue, value?: any): AddressValue;
|
|
1678
1713
|
/**
|
|
1679
1714
|
* The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
|
|
1680
1715
|
*
|
|
1681
1716
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
|
|
1682
1717
|
*/
|
|
1683
|
-
set(index:
|
|
1718
|
+
set(index: AddressValue, value?: any): void;
|
|
1684
1719
|
}
|
|
1685
1720
|
|
|
1686
1721
|
var Table: {
|
|
@@ -1688,14 +1723,32 @@ declare namespace WebAssembly {
|
|
|
1688
1723
|
new(descriptor: TableDescriptor, value?: any): Table;
|
|
1689
1724
|
};
|
|
1690
1725
|
|
|
1726
|
+
/**
|
|
1727
|
+
* The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
|
|
1728
|
+
*
|
|
1729
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
|
|
1730
|
+
*/
|
|
1731
|
+
interface Tag {
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
var Tag: {
|
|
1735
|
+
prototype: Tag;
|
|
1736
|
+
new(type: TagType): Tag;
|
|
1737
|
+
};
|
|
1738
|
+
|
|
1739
|
+
interface ExceptionOptions {
|
|
1740
|
+
traceStack?: boolean;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1691
1743
|
interface GlobalDescriptor<T extends ValueType = ValueType> {
|
|
1692
1744
|
mutable?: boolean;
|
|
1693
1745
|
value: T;
|
|
1694
1746
|
}
|
|
1695
1747
|
|
|
1696
1748
|
interface MemoryDescriptor {
|
|
1697
|
-
|
|
1698
|
-
|
|
1749
|
+
address?: AddressType;
|
|
1750
|
+
initial: AddressValue;
|
|
1751
|
+
maximum?: AddressValue;
|
|
1699
1752
|
shared?: boolean;
|
|
1700
1753
|
}
|
|
1701
1754
|
|
|
@@ -1711,9 +1764,14 @@ declare namespace WebAssembly {
|
|
|
1711
1764
|
}
|
|
1712
1765
|
|
|
1713
1766
|
interface TableDescriptor {
|
|
1767
|
+
address?: AddressType;
|
|
1714
1768
|
element: TableKind;
|
|
1715
|
-
initial:
|
|
1716
|
-
maximum?:
|
|
1769
|
+
initial: AddressValue;
|
|
1770
|
+
maximum?: AddressValue;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
interface TagType {
|
|
1774
|
+
parameters: ValueType[];
|
|
1717
1775
|
}
|
|
1718
1776
|
|
|
1719
1777
|
interface ValueTypeMap {
|
|
@@ -1726,26 +1784,34 @@ declare namespace WebAssembly {
|
|
|
1726
1784
|
v128: never;
|
|
1727
1785
|
}
|
|
1728
1786
|
|
|
1787
|
+
interface WebAssemblyCompileOptions {
|
|
1788
|
+
builtins?: string[];
|
|
1789
|
+
importedStringConstants?: string | null;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1729
1792
|
interface WebAssemblyInstantiatedSource {
|
|
1730
1793
|
instance: Instance;
|
|
1731
1794
|
module: Module;
|
|
1732
1795
|
}
|
|
1733
1796
|
|
|
1734
|
-
type
|
|
1797
|
+
type AddressType = "i32" | "i64";
|
|
1798
|
+
type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
|
|
1735
1799
|
type TableKind = "anyfunc" | "externref";
|
|
1800
|
+
type AddressValue = number;
|
|
1736
1801
|
type ExportValue = Function | Global | Memory | Table;
|
|
1737
1802
|
type Exports = Record<string, ExportValue>;
|
|
1738
1803
|
type ImportValue = ExportValue | number;
|
|
1739
1804
|
type Imports = Record<string, ModuleImports>;
|
|
1740
1805
|
type ModuleImports = Record<string, ImportValue>;
|
|
1741
1806
|
type ValueType = keyof ValueTypeMap;
|
|
1807
|
+
var JSTag: Tag;
|
|
1742
1808
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
|
|
1743
|
-
function compile(bytes: BufferSource): Promise<Module>;
|
|
1809
|
+
function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
|
|
1744
1810
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
|
|
1745
|
-
function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
|
|
1811
|
+
function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
|
|
1746
1812
|
function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
|
|
1747
1813
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
|
|
1748
|
-
function validate(bytes: BufferSource): boolean;
|
|
1814
|
+
function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
|
|
1749
1815
|
}
|
|
1750
1816
|
|
|
1751
1817
|
/** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
|
package/ts5.6/index.d.ts
CHANGED
|
@@ -60,6 +60,10 @@ interface QueuingStrategyInit {
|
|
|
60
60
|
highWaterMark: number;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
interface ReadableStreamBYOBReaderReadOptions {
|
|
64
|
+
min?: number;
|
|
65
|
+
}
|
|
66
|
+
|
|
63
67
|
interface ReadableStreamGetReaderOptions {
|
|
64
68
|
/**
|
|
65
69
|
* Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
|
|
@@ -955,7 +959,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
|
|
|
955
959
|
*
|
|
956
960
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
|
|
957
961
|
*/
|
|
958
|
-
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
|
|
962
|
+
read<T extends ArrayBufferView>(view: T, options?: ReadableStreamBYOBReaderReadOptions): Promise<ReadableStreamReadResult<T>>;
|
|
959
963
|
/**
|
|
960
964
|
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
|
|
961
965
|
*
|
|
@@ -1543,6 +1547,37 @@ declare namespace WebAssembly {
|
|
|
1543
1547
|
(message?: string): CompileError;
|
|
1544
1548
|
};
|
|
1545
1549
|
|
|
1550
|
+
/**
|
|
1551
|
+
* The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
|
|
1552
|
+
*
|
|
1553
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
|
|
1554
|
+
*/
|
|
1555
|
+
interface Exception {
|
|
1556
|
+
/**
|
|
1557
|
+
* The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
|
|
1558
|
+
*
|
|
1559
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
|
|
1560
|
+
*/
|
|
1561
|
+
readonly stack: string | undefined;
|
|
1562
|
+
/**
|
|
1563
|
+
* 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.
|
|
1564
|
+
*
|
|
1565
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
|
|
1566
|
+
*/
|
|
1567
|
+
getArg(index: number): any;
|
|
1568
|
+
/**
|
|
1569
|
+
* The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
|
|
1570
|
+
*
|
|
1571
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
|
|
1572
|
+
*/
|
|
1573
|
+
is(exceptionTag: Tag): boolean;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
var Exception: {
|
|
1577
|
+
prototype: Exception;
|
|
1578
|
+
new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
|
|
1579
|
+
};
|
|
1580
|
+
|
|
1546
1581
|
/**
|
|
1547
1582
|
* A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
|
|
1548
1583
|
*
|
|
@@ -1603,7 +1638,7 @@ declare namespace WebAssembly {
|
|
|
1603
1638
|
*
|
|
1604
1639
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
|
|
1605
1640
|
*/
|
|
1606
|
-
grow(delta:
|
|
1641
|
+
grow(delta: AddressValue): AddressValue;
|
|
1607
1642
|
}
|
|
1608
1643
|
|
|
1609
1644
|
var Memory: {
|
|
@@ -1621,7 +1656,7 @@ declare namespace WebAssembly {
|
|
|
1621
1656
|
|
|
1622
1657
|
var Module: {
|
|
1623
1658
|
prototype: Module;
|
|
1624
|
-
new(bytes: BufferSource): Module;
|
|
1659
|
+
new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
|
|
1625
1660
|
/**
|
|
1626
1661
|
* 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
1662
|
*
|
|
@@ -1662,25 +1697,25 @@ declare namespace WebAssembly {
|
|
|
1662
1697
|
*
|
|
1663
1698
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
|
|
1664
1699
|
*/
|
|
1665
|
-
readonly length:
|
|
1700
|
+
readonly length: AddressValue;
|
|
1666
1701
|
/**
|
|
1667
1702
|
* The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
|
|
1668
1703
|
*
|
|
1669
1704
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
|
|
1670
1705
|
*/
|
|
1671
|
-
get(index:
|
|
1706
|
+
get(index: AddressValue): any;
|
|
1672
1707
|
/**
|
|
1673
1708
|
* 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
1709
|
*
|
|
1675
1710
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
|
|
1676
1711
|
*/
|
|
1677
|
-
grow(delta:
|
|
1712
|
+
grow(delta: AddressValue, value?: any): AddressValue;
|
|
1678
1713
|
/**
|
|
1679
1714
|
* The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
|
|
1680
1715
|
*
|
|
1681
1716
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
|
|
1682
1717
|
*/
|
|
1683
|
-
set(index:
|
|
1718
|
+
set(index: AddressValue, value?: any): void;
|
|
1684
1719
|
}
|
|
1685
1720
|
|
|
1686
1721
|
var Table: {
|
|
@@ -1688,14 +1723,32 @@ declare namespace WebAssembly {
|
|
|
1688
1723
|
new(descriptor: TableDescriptor, value?: any): Table;
|
|
1689
1724
|
};
|
|
1690
1725
|
|
|
1726
|
+
/**
|
|
1727
|
+
* The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
|
|
1728
|
+
*
|
|
1729
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
|
|
1730
|
+
*/
|
|
1731
|
+
interface Tag {
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
var Tag: {
|
|
1735
|
+
prototype: Tag;
|
|
1736
|
+
new(type: TagType): Tag;
|
|
1737
|
+
};
|
|
1738
|
+
|
|
1739
|
+
interface ExceptionOptions {
|
|
1740
|
+
traceStack?: boolean;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1691
1743
|
interface GlobalDescriptor<T extends ValueType = ValueType> {
|
|
1692
1744
|
mutable?: boolean;
|
|
1693
1745
|
value: T;
|
|
1694
1746
|
}
|
|
1695
1747
|
|
|
1696
1748
|
interface MemoryDescriptor {
|
|
1697
|
-
|
|
1698
|
-
|
|
1749
|
+
address?: AddressType;
|
|
1750
|
+
initial: AddressValue;
|
|
1751
|
+
maximum?: AddressValue;
|
|
1699
1752
|
shared?: boolean;
|
|
1700
1753
|
}
|
|
1701
1754
|
|
|
@@ -1711,9 +1764,14 @@ declare namespace WebAssembly {
|
|
|
1711
1764
|
}
|
|
1712
1765
|
|
|
1713
1766
|
interface TableDescriptor {
|
|
1767
|
+
address?: AddressType;
|
|
1714
1768
|
element: TableKind;
|
|
1715
|
-
initial:
|
|
1716
|
-
maximum?:
|
|
1769
|
+
initial: AddressValue;
|
|
1770
|
+
maximum?: AddressValue;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
interface TagType {
|
|
1774
|
+
parameters: ValueType[];
|
|
1717
1775
|
}
|
|
1718
1776
|
|
|
1719
1777
|
interface ValueTypeMap {
|
|
@@ -1726,26 +1784,34 @@ declare namespace WebAssembly {
|
|
|
1726
1784
|
v128: never;
|
|
1727
1785
|
}
|
|
1728
1786
|
|
|
1787
|
+
interface WebAssemblyCompileOptions {
|
|
1788
|
+
builtins?: string[];
|
|
1789
|
+
importedStringConstants?: string | null;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1729
1792
|
interface WebAssemblyInstantiatedSource {
|
|
1730
1793
|
instance: Instance;
|
|
1731
1794
|
module: Module;
|
|
1732
1795
|
}
|
|
1733
1796
|
|
|
1734
|
-
type
|
|
1797
|
+
type AddressType = "i32" | "i64";
|
|
1798
|
+
type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
|
|
1735
1799
|
type TableKind = "anyfunc" | "externref";
|
|
1800
|
+
type AddressValue = number;
|
|
1736
1801
|
type ExportValue = Function | Global | Memory | Table;
|
|
1737
1802
|
type Exports = Record<string, ExportValue>;
|
|
1738
1803
|
type ImportValue = ExportValue | number;
|
|
1739
1804
|
type Imports = Record<string, ModuleImports>;
|
|
1740
1805
|
type ModuleImports = Record<string, ImportValue>;
|
|
1741
1806
|
type ValueType = keyof ValueTypeMap;
|
|
1807
|
+
var JSTag: Tag;
|
|
1742
1808
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
|
|
1743
|
-
function compile(bytes: BufferSource): Promise<Module>;
|
|
1809
|
+
function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
|
|
1744
1810
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
|
|
1745
|
-
function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
|
|
1811
|
+
function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
|
|
1746
1812
|
function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
|
|
1747
1813
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
|
|
1748
|
-
function validate(bytes: BufferSource): boolean;
|
|
1814
|
+
function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
|
|
1749
1815
|
}
|
|
1750
1816
|
|
|
1751
1817
|
/** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
|
package/ts5.9/index.d.ts
CHANGED
|
@@ -60,6 +60,10 @@ interface QueuingStrategyInit {
|
|
|
60
60
|
highWaterMark: number;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
interface ReadableStreamBYOBReaderReadOptions {
|
|
64
|
+
min?: number;
|
|
65
|
+
}
|
|
66
|
+
|
|
63
67
|
interface ReadableStreamGetReaderOptions {
|
|
64
68
|
/**
|
|
65
69
|
* Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
|
|
@@ -955,7 +959,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
|
|
|
955
959
|
*
|
|
956
960
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
|
|
957
961
|
*/
|
|
958
|
-
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
|
|
962
|
+
read<T extends ArrayBufferView>(view: T, options?: ReadableStreamBYOBReaderReadOptions): Promise<ReadableStreamReadResult<T>>;
|
|
959
963
|
/**
|
|
960
964
|
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
|
|
961
965
|
*
|
|
@@ -1543,6 +1547,37 @@ declare namespace WebAssembly {
|
|
|
1543
1547
|
(message?: string): CompileError;
|
|
1544
1548
|
};
|
|
1545
1549
|
|
|
1550
|
+
/**
|
|
1551
|
+
* The **`WebAssembly.Exception`** object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler.
|
|
1552
|
+
*
|
|
1553
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception)
|
|
1554
|
+
*/
|
|
1555
|
+
interface Exception {
|
|
1556
|
+
/**
|
|
1557
|
+
* The read-only **`stack`** property of an object instance of type `WebAssembly.Exception` _may_ contain a stack trace.
|
|
1558
|
+
*
|
|
1559
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/stack)
|
|
1560
|
+
*/
|
|
1561
|
+
readonly stack: string | undefined;
|
|
1562
|
+
/**
|
|
1563
|
+
* 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.
|
|
1564
|
+
*
|
|
1565
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg)
|
|
1566
|
+
*/
|
|
1567
|
+
getArg(index: number): any;
|
|
1568
|
+
/**
|
|
1569
|
+
* The **`is()`** prototype method of the `Exception` object can be used to test if the `Exception` matches a given tag.
|
|
1570
|
+
*
|
|
1571
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Exception/is)
|
|
1572
|
+
*/
|
|
1573
|
+
is(exceptionTag: Tag): boolean;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
var Exception: {
|
|
1577
|
+
prototype: Exception;
|
|
1578
|
+
new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception;
|
|
1579
|
+
};
|
|
1580
|
+
|
|
1546
1581
|
/**
|
|
1547
1582
|
* A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
|
|
1548
1583
|
*
|
|
@@ -1603,7 +1638,7 @@ declare namespace WebAssembly {
|
|
|
1603
1638
|
*
|
|
1604
1639
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
|
|
1605
1640
|
*/
|
|
1606
|
-
grow(delta:
|
|
1641
|
+
grow(delta: AddressValue): AddressValue;
|
|
1607
1642
|
}
|
|
1608
1643
|
|
|
1609
1644
|
var Memory: {
|
|
@@ -1621,7 +1656,7 @@ declare namespace WebAssembly {
|
|
|
1621
1656
|
|
|
1622
1657
|
var Module: {
|
|
1623
1658
|
prototype: Module;
|
|
1624
|
-
new(bytes: BufferSource): Module;
|
|
1659
|
+
new(bytes: BufferSource, options?: WebAssemblyCompileOptions): Module;
|
|
1625
1660
|
/**
|
|
1626
1661
|
* 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
1662
|
*
|
|
@@ -1662,25 +1697,25 @@ declare namespace WebAssembly {
|
|
|
1662
1697
|
*
|
|
1663
1698
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
|
|
1664
1699
|
*/
|
|
1665
|
-
readonly length:
|
|
1700
|
+
readonly length: AddressValue;
|
|
1666
1701
|
/**
|
|
1667
1702
|
* The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
|
|
1668
1703
|
*
|
|
1669
1704
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
|
|
1670
1705
|
*/
|
|
1671
|
-
get(index:
|
|
1706
|
+
get(index: AddressValue): any;
|
|
1672
1707
|
/**
|
|
1673
1708
|
* 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
1709
|
*
|
|
1675
1710
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
|
|
1676
1711
|
*/
|
|
1677
|
-
grow(delta:
|
|
1712
|
+
grow(delta: AddressValue, value?: any): AddressValue;
|
|
1678
1713
|
/**
|
|
1679
1714
|
* The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
|
|
1680
1715
|
*
|
|
1681
1716
|
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
|
|
1682
1717
|
*/
|
|
1683
|
-
set(index:
|
|
1718
|
+
set(index: AddressValue, value?: any): void;
|
|
1684
1719
|
}
|
|
1685
1720
|
|
|
1686
1721
|
var Table: {
|
|
@@ -1688,14 +1723,32 @@ declare namespace WebAssembly {
|
|
|
1688
1723
|
new(descriptor: TableDescriptor, value?: any): Table;
|
|
1689
1724
|
};
|
|
1690
1725
|
|
|
1726
|
+
/**
|
|
1727
|
+
* The **`WebAssembly.Tag`** object defines a _type_ of a WebAssembly exception that can be thrown to/from WebAssembly code.
|
|
1728
|
+
*
|
|
1729
|
+
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Tag)
|
|
1730
|
+
*/
|
|
1731
|
+
interface Tag {
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
var Tag: {
|
|
1735
|
+
prototype: Tag;
|
|
1736
|
+
new(type: TagType): Tag;
|
|
1737
|
+
};
|
|
1738
|
+
|
|
1739
|
+
interface ExceptionOptions {
|
|
1740
|
+
traceStack?: boolean;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1691
1743
|
interface GlobalDescriptor<T extends ValueType = ValueType> {
|
|
1692
1744
|
mutable?: boolean;
|
|
1693
1745
|
value: T;
|
|
1694
1746
|
}
|
|
1695
1747
|
|
|
1696
1748
|
interface MemoryDescriptor {
|
|
1697
|
-
|
|
1698
|
-
|
|
1749
|
+
address?: AddressType;
|
|
1750
|
+
initial: AddressValue;
|
|
1751
|
+
maximum?: AddressValue;
|
|
1699
1752
|
shared?: boolean;
|
|
1700
1753
|
}
|
|
1701
1754
|
|
|
@@ -1711,9 +1764,14 @@ declare namespace WebAssembly {
|
|
|
1711
1764
|
}
|
|
1712
1765
|
|
|
1713
1766
|
interface TableDescriptor {
|
|
1767
|
+
address?: AddressType;
|
|
1714
1768
|
element: TableKind;
|
|
1715
|
-
initial:
|
|
1716
|
-
maximum?:
|
|
1769
|
+
initial: AddressValue;
|
|
1770
|
+
maximum?: AddressValue;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
interface TagType {
|
|
1774
|
+
parameters: ValueType[];
|
|
1717
1775
|
}
|
|
1718
1776
|
|
|
1719
1777
|
interface ValueTypeMap {
|
|
@@ -1726,26 +1784,34 @@ declare namespace WebAssembly {
|
|
|
1726
1784
|
v128: never;
|
|
1727
1785
|
}
|
|
1728
1786
|
|
|
1787
|
+
interface WebAssemblyCompileOptions {
|
|
1788
|
+
builtins?: string[];
|
|
1789
|
+
importedStringConstants?: string | null;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1729
1792
|
interface WebAssemblyInstantiatedSource {
|
|
1730
1793
|
instance: Instance;
|
|
1731
1794
|
module: Module;
|
|
1732
1795
|
}
|
|
1733
1796
|
|
|
1734
|
-
type
|
|
1797
|
+
type AddressType = "i32" | "i64";
|
|
1798
|
+
type ImportExportKind = "function" | "global" | "memory" | "table" | "tag";
|
|
1735
1799
|
type TableKind = "anyfunc" | "externref";
|
|
1800
|
+
type AddressValue = number;
|
|
1736
1801
|
type ExportValue = Function | Global | Memory | Table;
|
|
1737
1802
|
type Exports = Record<string, ExportValue>;
|
|
1738
1803
|
type ImportValue = ExportValue | number;
|
|
1739
1804
|
type Imports = Record<string, ModuleImports>;
|
|
1740
1805
|
type ModuleImports = Record<string, ImportValue>;
|
|
1741
1806
|
type ValueType = keyof ValueTypeMap;
|
|
1807
|
+
var JSTag: Tag;
|
|
1742
1808
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
|
|
1743
|
-
function compile(bytes: BufferSource): Promise<Module>;
|
|
1809
|
+
function compile(bytes: BufferSource, options?: WebAssemblyCompileOptions): Promise<Module>;
|
|
1744
1810
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
|
|
1745
|
-
function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
|
|
1811
|
+
function instantiate(bytes: BufferSource, importObject?: Imports, options?: WebAssemblyCompileOptions): Promise<WebAssemblyInstantiatedSource>;
|
|
1746
1812
|
function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
|
|
1747
1813
|
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
|
|
1748
|
-
function validate(bytes: BufferSource): boolean;
|
|
1814
|
+
function validate(bytes: BufferSource, options?: WebAssemblyCompileOptions): boolean;
|
|
1749
1815
|
}
|
|
1750
1816
|
|
|
1751
1817
|
/** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
|