Skip to main content

default

Callable

  • default(module_or_path?: { memory?: Memory; module_or_path: InitInput | Promise<InitInput>; thread_stack_size?: number } | InitInput | Promise<InitInput>, memory?: Memory): Promise<InitOutput>

  • If module_or_path is {RequestInfo} or {URL}, makes a request and for everything else, calls WebAssembly.instantiate directly.


    Parameters

    • optionalmodule_or_path: { memory?: Memory; module_or_path: InitInput | Promise<InitInput>; thread_stack_size?: number } | InitInput | Promise<InitInput>

      Passing InitInput directly is deprecated.

      • optionalmemory: Memory
      • module_or_path: InitInput | Promise<InitInput>
      • optionalthread_stack_size: number
    • optionalmemory: Memory

      Deprecated.

    Returns Promise<InitOutput>