Skip to content

@sebastianwessel/quickjs v2.1.1


@sebastianwessel/quickjs / loadAsyncQuickJs

Function: loadAsyncQuickJs()

loadAsyncQuickJs(loadOptions): Promise<{ module: QuickJSAsyncWASMModule; runSandboxed: <T>(sandboxedFunction, sandboxOptions) => Promise<T>; }>

Defined in: src/loadAsyncQuickJs.ts:21

Loads the QuickJS async module and returns a sandbox execution function.

Parameters

loadOptions

LoadAsyncQuickJsOptions = '@jitl/quickjs-ng-wasmfile-release-asyncify'

Options for loading the QuickJS module. Defaults to '@jitl/quickjs-ng-wasmfile-release-asyncify'.

Returns

Promise<{ module: QuickJSAsyncWASMModule; runSandboxed: <T>(sandboxedFunction, sandboxOptions) => Promise<T>; }>

An object containing the runSandboxed function and the loaded module.