import type { FileSymbols, SymbolLang } from './schema.js'; /** * Load only the parser needed for this file. Keeping these imports lazy is * important for the project server: TypeScript's compiler API stays out of the * SQLite/IPC owner when TS/JS parsing is delegated to parser workers. */ export declare function parseFileContent(file: string, content: string, lang: SymbolLang): Promise; /** * Parse a mixed-language batch of files (P3.8). * * Go and Python files are grouped and handed to ONE child process per chunk * (`runGoBatch` / `runPyBatch`) instead of one spawn per file; every other * language goes through `parseFileContent` as before. Files the batch * parsers could not produce (per-file error inside the envelope, or the * whole chunk failing) fall back to the single-file parser, which owns the * per-language fallback semantics — so output is identical to the per-file * path in every case, only faster. * * Results are returned in input order (index-aligned), matching what callers * expected from N parallel `parseFileContent` calls. * * Opt out with `WRONGSTACK_TOOLCHAIN_BATCH=0` to restore per-file spawning * everywhere (bisecting a toolchain issue, exotic environments). */ /** * One file's parse outcome. `result` is null only when the parser THREW — * batch-invalid files still come back with the fallback parser's own * zero-symbol semantics. `error` carries the throw's message so callers can * record something actionable instead of a bare "no result". */ interface ParseSlot { result: FileSymbols | null; error?: string | undefined; } export declare function parseFilesContent(files: ReadonlyArray<{ file: string; content: string; lang: SymbolLang; }>): Promise; export {}; //# sourceMappingURL=parser-dispatch.d.ts.map