Skip to main content

Function: initAsync()

function initAsync(input?): Promise<void>;

Load and initialize the WASM module.

Parameters

input?

string | URL | ArrayBuffer | Uint8Array<ArrayBufferLike>

One of:

  • string or URL: location of the .wasm binary to fetch (browser).
  • ArrayBuffer or Uint8Array: raw .wasm bytes (Node.js, where fetch('file://…') isn't reliably supported — pass fs.readFileSync(...) instead).
  • omitted: defaults to index_bg.wasm resolved relative to this JS module.

Returns

Promise<void>