import type { NativeParserInstance } from "./grammar-loaders.js"; export declare const DEFAULT_STRUCTURAL_PARSER_CAPACITY = 4; export declare const MAX_STRUCTURAL_PARSER_CAPACITY = 32; export declare const DEFAULT_STRUCTURAL_ACQUIRE_TIMEOUT_MS = 5000; export declare const MAX_STRUCTURAL_ACQUIRE_TIMEOUT_MS = 60000; export interface ParserLease { readonly key: string; parse(source: Buffer): ReturnType; release(): void; } export interface ParserPoolOptions { capacity?: number; acquireTimeoutMs?: number; createParser: () => NativeParserInstance; scheduleTimeout?: (callback: () => void, timeoutMs: number) => unknown; cancelTimeout?: (timer: unknown) => void; } export declare class ParserAcquireTimeoutError extends Error { readonly key: string; readonly timeoutMs: number; readonly code = "PARSER_ACQUIRE_TIMEOUT"; constructor(key: string, timeoutMs: number); } /** Globally FIFO, bounded parser ownership with safe idle retargeting. */ export declare class StructuralParserPool { #private; readonly capacity: number; readonly acquireTimeoutMs: number; constructor(options: ParserPoolOptions); get size(): number; get waiting(): number; acquire(key: string, language: unknown): Promise; } //# sourceMappingURL=parser-pool.d.ts.map