import { Observable } from 'rxjs'; /** * taksWorker, starts a script in its own process */ export declare class TaskWorker { #private; /** * if a worker dies due to error on anything else unexpected 3 times in a row * it becomes false and can't start a new task anymore. the sub-process is killed */ active: boolean; ready: Promise | unknown; /** messages from the sub-process */ messages$: Observable<{ worker: TaskWorker; msg: any; }>; constructor(task: string); get id(): number; send(type: string, msg?: any): Promise; kill(): Promise; terminate(): Promise; }