import ts from "typescript"; import { type CandidateOverlay } from "./candidate-overlay.ts"; /** One normalized error-category compiler diagnostic. */ export interface ProjectDiagnostic { /** Project-relative POSIX path, or undefined for global/options diagnostics. */ path?: string; /** 1-based line, when the diagnostic has a location. */ line?: number; /** TypeScript diagnostic code. */ code: number; message: string; } export interface ValidationProgramContext { root: string; options: ts.CompilerOptions; /** Host that answers from the overlay first, then the real file system. */ host: ts.CompilerHost; /** On-disk JS/TS root files discovered with the bounded direct walk. */ projectFiles: string[]; } /** Prepare compiler options, baseline host, and the on-disk JS/TS file list once per run. */ export declare function createValidationProgramContext(root: string): Promise; /** Overlay-aware compiler host for module resolution outside program creation. */ export declare function overlayCompilerHost(context: ValidationProgramContext, overlay: CandidateOverlay): ts.CompilerHost; /** * Collect error-category diagnostics for the given program state. Diagnostics * inside `node_modules` or outside the project root are dropped symmetrically * for baseline and candidate, so third-party typing noise never decides a unit. */ export declare function collectProjectDiagnostics(context: ValidationProgramContext, overlay?: CandidateOverlay): ProjectDiagnostic[]; /** * Diff candidate diagnostics against the baseline so pre-existing project * errors are never blamed on generated units. Files the overlay does not touch * compare location-aware (path, code, line, message); overlay-modified files * compare by multiplicity of (path, code, message) because replacements shift * lines; overlay-created files are entirely new, so every diagnostic counts. */ export declare function newlyIntroducedProjectDiagnostics(baseline: readonly ProjectDiagnostic[], candidate: readonly ProjectDiagnostic[], overlay: CandidateOverlay): ProjectDiagnostic[]; //# sourceMappingURL=program-diagnostics.d.ts.map