Skip to content

Commit b3cde9d

Browse files
MaxGraeydcodeIO
authored andcommitted
Loader: Add optional memory & table to ASUtil (#909)
Also marks the BigInt API as possibly undefined.
1 parent 576c295 commit b3cde9d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/loader/index.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ interface ImportsObject extends Record<string, any> {
1414

1515
/** Utility mixed in by the loader. */
1616
interface ASUtil {
17+
memory?: WebAssembly.Memory;
18+
table?: WebAssembly.Table;
19+
1720
/** Explicit start function, if requested. */
1821
__start(): void;
1922
/** Allocates a new string in the module's memory and returns a reference (pointer) to it. */
@@ -41,9 +44,9 @@ interface ASUtil {
4144
/** Reads the values of Uint32Array from the module's memory. */
4245
__getUint32Array(ptr: number): Uint32Array;
4346
/** Reads the values of Int32Array from the module's memory. */
44-
__getInt64Array(ptr: number): BigInt64Array;
47+
__getInt64Array?(ptr: number): BigInt64Array;
4548
/** Reads the values of Uint32Array from the module's memory. */
46-
__getUint64Array(ptr: number): BigUint64Array;
49+
__getUint64Array?(ptr: number): BigUint64Array;
4750
/** Reads the values of Float32Array from the module's memory. */
4851
__getFloat32Array(ptr: number): Float32Array;
4952
/** Reads the values of Float64Array from the module's memory. */

0 commit comments

Comments
 (0)