export interface CreateThreadOptions> { workerFile: string; type: string; debug?: boolean; payload?: T; } export interface WorkerMessageBody { type: string; data?: T; end?: boolean; } /** fork 方式创建子进程 */ export declare function createChildProcess(options: CreateThreadOptions, onMessage?: (d: WorkerMessageBody) => void): { worker: import("child_process").ChildProcess; wait: Promise; controller: AbortController; }; /** worker init: use in child process */ export declare function childProcessInit(onmessage: (msg: CreateThreadOptions) => void): { exit: (data: unknown) => never; };