/** * Generic RPC proxy over a Web Worker. Post `{ id, method, args }` messages * and resolve the matching promise when `{ id, result }` or `{ id, error }` * comes back. Works with any worker that follows this message protocol. * * Pass a pre-constructed Worker so that bundlers (webpack/turbopack) can * statically detect the `new Worker(new URL(...))` pattern at the call site. */ export declare class WorkerProxy { private worker; private nextId; private pending; private streams; constructor(worker: Worker); call(method: string, ...args: unknown[]): Promise; callStream(method: string, ...args: unknown[]): AsyncGenerator; terminate(): void; }