/**
 * OCR Worker Script
 *
 * Runs ocrRecognize() in a worker thread so the main event loop stays responsive.
 * Supports both Node.js worker_threads and browser Web Workers.
 *
 * Protocol:
 * - Node.js: receives init data via workerData, auto-initializes WASM
 * - Browser: waits for { type: 'init', wasmGluePath, wasmBinary? } message
 * - Posts { type: 'ready' } when WASM is initialized
 * - Receives { type: 'ocr', id, imageData, tessdata, language }
 * - Posts { type: 'result', id, text } or { type: 'error', id, error }
 */
interface OcrWasm {
    ocrRecognize(imageBytes: Uint8Array, tessdata: Uint8Array, language: string): string;
    default(input?: BufferSource | WebAssembly.Module): Promise<void>;
}
declare let wasm: OcrWasm | null;
declare let postFn: (data: unknown) => void;
declare function initWasm(wasmGluePath: string, wasmBinary?: ArrayBufferLike): Promise<void>;
declare function onMessage(msg: Record<string, unknown>): void;
declare function bootstrap(): Promise<void>;
//# sourceMappingURL=ocr-worker.d.ts.map