export interface WorkerFarmOptions {
    maxWorkerCount?: number;
    spawnBehaviour?: "eager" | "lazy";
}
export declare const createWorkerFarm: <T extends object>(createWorker: () => Worker, { maxWorkerCount, spawnBehaviour }?: WorkerFarmOptions) => { [key in keyof T]: T[key] extends Function ? T[key] extends (...args: infer U) => infer R ? (...args: U) => R extends Promise<any> ? R : Promise<R> : never : () => T[key] extends Promise<any> ? T[key] : Promise<T[key]>; };
