export function getStrPtr(str: string): number; export function getTypedArrayPtr(data: TypedArray): number; export class WasmRes { /** * @private * @param {number} ptr * @returns {number} */ private static _getUint32; /** * @private * @param {number} ptr * @param {keyof WasmRes} method */ private static _readAndFree; /** * read wasm responses as Uint8Array * @param {number} ptr * @returns {Uint8Array} */ static readData(ptr: number): Uint8Array; /** * read wasm responses as UTF-8 string * @param {number} ptr * @returns {string} */ static readText(ptr: number): string; /** * read wasm responses as number * @param {number} ptr * @returns {number} */ static readNum(ptr: number): number; /** * Read responses from the wasm module * @param {number} ptr char* pointer to the responses data */ constructor(ptr: number); /** @type {number} */ _ptr: number; /** @type {number} */ _size: number; /** * pointer to the error code * @private */ private get _retCodePtr(); /** * pointer to the data size * @private */ private get _sizePtr(); /** * pointer to the data contents * @private */ private get _dataPtr(); /** * @private * throw error if not ok */ private _checkRet; /** * Read the data contents as Uint8Array * @returns {Uint8Array} */ data(): Uint8Array; /** * Read the data contents as UTF-8 string * @returns {string} */ text(): string; /** * Read the data contents as number * @returns {number} */ number(): number; free(): void; } export function freePtr(bufPtr: number): void; /** * this promise is resolved when the runtime is fully initialized */ export const RuntimeInitialized: Promise; export class WasmError extends Error { /** * @param {number} errorCode * @param {string} msg */ constructor(errorCode: number, msg: string); errorCode: number; errorName: string; } export namespace WasmError { const CODE_OK: 0; } /** * get the pointer to a TypedArray, as char* */ export type TypedArray = Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array; /** @type {Record} */ export let Module: Record;