import { EngineConfig, EngineHandle, EngineId, FileInput, RunResult } from '../core/types'; export interface EngineWrapperOptions extends Omit { /** Reuse an existing handle instead of creating a new one. */ engine?: EngineHandle; /** Pass to the underlying createEngine() if no handle is supplied. */ useWorker?: boolean; } /** * Wall-clock ceiling for one engine invocation when the caller names none. * A runaway `\def\x{\x}\x` otherwise spins the worker forever, and on a * phone that is a dead app rather than a failed compile. Generous enough for * a large document on slow mobile hardware; pass `timeoutMs: 0` to opt out. */ export declare const DEFAULT_RUN_TIMEOUT_MS = 300000; /** Per-invocation limits every typed wrapper accepts. */ export interface RunLimits { /** * Wall-clock ceiling in ms. Default: DEFAULT_RUN_TIMEOUT_MS. `0` disables * it. Enforcing it terminates the worker, so the handle (and any wrapper * that borrowed it) is unusable afterwards. */ timeoutMs?: number; /** Cancels the run — same worker-terminating semantics as `timeoutMs`. */ signal?: AbortSignal; } /** Pick just the limits out of a wrapper's option bag (exactOptionalPropertyTypes). */ export declare function limitsOf(options: RunLimits): RunLimits; export declare abstract class BaseEngineWrapper { protected options: EngineWrapperOptions; protected abstract readonly engineId: EngineId; protected handle: EngineHandle | null; constructor(options?: EngineWrapperOptions); protected ensureHandle(): Promise; /** Drop the worker if this wrapper owns one. */ dispose(): Promise; protected runRaw(args: string[], files: FileInput[], extra?: RunLimits & { cwd?: string; env?: Record; }): Promise; } //# sourceMappingURL=base.d.ts.map