import type { WaferMapInput, WaferMapResult } from '../renderer/buildWaferMap.js';
import type { AnalyzeWaferMapOptions, LotStatsSummary, StatsSummary } from '../stats/index.js';
export interface WafermapWorker {
    /** Run buildWaferMap in the worker thread. Returns a promise that resolves with the result. */
    run(input: WaferMapInput): Promise<WaferMapResult>;
    /** Run analyzeWaferMap (and optionally analyzeWaferLot) in the worker thread. */
    runAnalysis(results: WaferMapResult[], options: AnalyzeWaferMapOptions, hasMultiWafer: boolean): Promise<{
        waferSummaries: StatsSummary[];
        lotSummary: LotStatsSummary | null;
    }>;
    /**
     * Build and analyse in a single round-trip. The built `WaferMapResult`s stay
     * in the worker for analysis instead of being sent out and cloned back in, so
     * the large result objects cross the worker boundary only once (out), not three
     * times. Prefer this over `run` + `runAnalysis` when you need both.
     */
    runWithAnalysis(inputs: WaferMapInput[], options: AnalyzeWaferMapOptions, hasMultiWafer: boolean): Promise<{
        results: WaferMapResult[];
        waferSummaries: StatsSummary[];
        lotSummary: LotStatsSummary | null;
    }>;
    /** Terminate the underlying Worker. Call when the worker is no longer needed. */
    terminate(): void;
}
/**
 * Creates a wrapper around a `wafermap.worker.js` Web Worker.
 *
 * Pass the worker URL (or a pre-constructed Worker instance) — the worker
 * script must be the compiled `wafermap.worker.js` served from your build
 * output.
 *
 * @example
 * // With a bundler (Vite, webpack…)
 * import workerUrl from '@wafertools/wafermap/worker-script?url';
 * const worker = createWafermapWorker(new Worker(workerUrl, { type: 'module' }));
 *
 * @example
 * // Plain script tag / CDN
 * const worker = createWafermapWorker(
 *   new Worker('/dist/wafermap.worker.js', { type: 'module' })
 * );
 */
export declare function createWafermapWorker(worker: Worker): WafermapWorker;
//# sourceMappingURL=index.d.ts.map