import { Worker as NodeWorker, type Transferable } from 'node:worker_threads';
/** Worker polyfill */
export declare class Worker extends EventTarget implements AbstractWorker {
    constructor(scriptURL: string | URL, options?: WorkerOptions);
    onmessage: ((this: Worker, ev: MessageEvent) => unknown) | null;
    onmessageerror: ((this: Worker, ev: MessageEvent) => unknown) | null;
    onerror: ((this: AbstractWorker, ev: ErrorEvent) => unknown) | null;
    protected readonly _worker: NodeWorker;
    /** @inheritdoc */
    postMessage(data: unknown, transfer?: Transferable[] | {
        transfer?: Transferable[];
    }): void;
    /** @inheritdoc */
    terminate(): void;
}
/** add message callback */
export declare function onMessage(callback: (value: unknown) => unknown): void;
/** post message */
export declare function postMessage(value: unknown, transfer?: Transferable[]): void;
export declare const MAX_WORKERS: number;
export { TransformStream } from 'node:stream/web';
//# sourceMappingURL=node.d.ts.map