/// import type { MessagePort } from 'worker_threads'; /** * Runner logic for Running a Project in a worker thread. */ export declare class ThreadRunner { private subjectFactory; constructor(subjectFactory: () => T); private requestInterceptors; /** * The instance of the object this runner will communicate with. It should have methods with the same names as the request being sent. */ private subject; private messageHandler; run(parentPort: MessagePort): void; /** * Fired anytime we get an `activate` request from the client. This allows us to clean up the previous project and make a new one */ private onActivate; } export interface ThreadRunnerSubject { /** * Called whenever a new subject has been activated */ activate(...args: any[]): void | Promise; /** * Called whenever a subject will no longer be used. Allows for cleaning up a subject. */ dispose(): void | Promise; }