import type { WorkerMessage } from './worker';
export interface WorkerInterface {
    postMessage: (message: any, transfer: Transferable[]) => void;
    addEventListener: (type: string, listener: (event: MessageEvent) => void) => void;
    removeEventListener: (type: string, listener: (event: MessageEvent) => void) => void;
}
export declare const postMessage: <T>(worker: WorkerInterface, message: WorkerMessage, callback: (...args: any[]) => T, transfer?: (OffscreenCanvas | Transferable)[]) => Promise<T>;
