import type { Project } from 'ts-morph';
/**
 * Build a fast workspace-relative source reader. File-walking detectors
 * (magic-numbers, console-log-prod, silent-catch, skip-tests, bad-config,
 * long-file, mutable-globals, …) used to readFileSync every
 * candidate file independently — the orchestrator already parsed those
 * same files into a shared ts-morph Project, so the disk I/O was pure
 * duplication. When a Project is passed, this reader serves text from
 * ts-morph's in-memory SourceFile cache; otherwise it falls back to
 * direct readFileSync so detectors keep working in their own tests
 * (where there is no shared Project to inject).
 *
 * Returns `null` on read failure (missing file, encoding error, etc.) —
 * callers should `continue` past missing files, same as the previous
 * readFileSync/try-catch shape.
 */
export type SourceReader = (rel: string) => string | null;
export declare function makeSourceReader(workspaceRoot: string, project?: Project): SourceReader;
//# sourceMappingURL=source-reader.d.ts.map