-
-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathnode.d.ts
More file actions
16 lines (13 loc) · 633 Bytes
/
node.d.ts
File metadata and controls
16 lines (13 loc) · 633 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import type { InstantiateOptions } from "../instantiate.js"
import type { Worker } from "node:worker_threads"
export type DefaultNodeSetupOptions = {
/* #if IS_WASI */
args?: string[],
/* #endif */
onExit?: (code: number) => void,
/* #if USE_SHARED_MEMORY */
spawnWorker?: (module: WebAssembly.Module, memory: WebAssembly.Memory, startArg: any) => Worker,
/* #endif */
}
export function defaultNodeSetup(options?: DefaultNodeSetupOptions): Promise<InstantiateOptions>
export function createDefaultWorkerFactory(preludeScript?: string): (module: WebAssembly.Module, memory: WebAssembly.Memory, startArg: any) => Worker