/**
 * This class mimic interface of real Web Worker so it can be passed to code that expect normal web
 * worker on browser side and operate as if it is the same, while executing the actual code on main
 * thread when Node environment is detected.
 *
 * The reason we need this is because hardhat, at the time of writting (Mar 12, 2024), do not support
 * ES Module worker with typescript. Enabling experimental ESM support for `ts-node` does not work
 * across all machines and environment, thus, we decided to run the worker's logic on main thread
 * during hardhat step.
 */
export declare class WorkerProxy {
    private isNode;
    /**
     * This allow browser or main thread to listen for worker response message
     * using the normal `worker.onmessage = () => {}` syntax. Is should only be side on the
     * main thread side, not on worker side.
     */
    onmessage: ((e: {
        data: any;
    }) => void) | null;
    /**
     * This allow browser or main thread to listen for worker response message
     * using the normal `worker.onerror = () => {}` syntax. Is should only be side on the
     * main thread side, not on worker side.
     */
    onerror: ((e: {
        data: {
            error: unknown;
        };
    }) => void) | null;
    private _eventEmitter;
    private get eventEmitter();
    constructor();
    terminate(): void;
    postMessage(message: unknown): void;
    postMessageToMainThread(message: unknown): void;
    postErrorToMainThread(error: unknown): void;
    private get parentPort();
}
