Add conditional BigInt support to loader & minor README fixes

This commit is contained in:
dcodeIO
2018-06-11 15:18:13 +02:00
parent c6ec5e2832
commit f2eb64c0fd
3 changed files with 39 additions and 17 deletions

20
lib/loader/index.d.ts vendored
View File

@ -13,21 +13,25 @@ interface ImportsObject {
/** Utility mixed in by the loader. */
interface ASUtil {
/** An 8-bit signed integer view on the memory. */
readonly I8: Uint8Array,
readonly I8: Uint8Array;
/** An 8-bit unsigned integer view on the memory. */
readonly U8: Uint8Array,
readonly U8: Uint8Array;
/** A 16-bit signed integer view on the memory. */
readonly I16: Uint16Array,
readonly I16: Uint16Array;
/** A 16-bit unsigned integer view on the memory. */
readonly U16: Uint16Array,
readonly U16: Uint16Array;
/** A 32-bit signed integer view on the memory. */
readonly I32: Uint32Array,
readonly I32: Uint32Array;
/** A 32-bit unsigned integer view on the memory. */
readonly U32: Uint32Array,
readonly U32: Uint32Array;
/** A 64-bit signed integer view on the memory. */
readonly I64: any; // BigInt64Array
/** A 64-bit unsigned integer vieww on the memory. */
readonly U64: any; // BigUint64Array
/** A 32-bit float view on the memory. */
readonly F32: Float32Array,
readonly F32: Float32Array;
/** A 64-bit float view on the memory. */
readonly F64: Float64Array,
readonly F64: Float64Array;
/** Allocates a new string in the module's memory and returns its pointer. */
newString(str: string): number;
/** Gets a string from the module's memory by its pointer. */