import WorkerPoolProgressCallback from './worker-pool-progress-callback.js';
import WorkerPoolRunTasksResult from './worker-pool-run-tasks-result.js';
interface RunInfo {
    taskQueue: any[];
    results: any[];
    addingTasks: boolean;
    postponed: boolean;
    runningWorkers: number;
    index: number;
    completedTasks: number;
    progressCallback: WorkerPoolProgressCallback | null;
    canceled: boolean | null;
    resolve?: (results: any) => void;
    reject?: (error: any) => void;
}
declare class WorkerPool {
    fcn: Function;
    workerQueue: Array<Worker | null>;
    runInfo: RunInfo[];
    constructor(poolSize: number, fcn: Function);
    runTasks(taskArgsArray: any[], progressCallback?: WorkerPoolProgressCallback | null): WorkerPoolRunTasksResult;
    terminateWorkers(): void;
    cancel(runId: number): void;
    private addTask;
    private clearTask;
}
export default WorkerPool;
