import ts from 'typescript';
/**
 * SourceFile cache shared across per-package validate programs within one
 * process. Files are immutable for the duration of a validate run, so any
 * file may be reused — but only when it was parsed the same way: the cache
 * key includes the language version and implied module format, so a package
 * targeting a different `target` (or resolving a file under a different
 * module format) never receives a stale parse. Per-package semantics such
 * as `lib` selection are unaffected by sharing: lib files are chosen by
 * filename per program, so a package without the DOM lib simply never
 * requests `lib.dom.d.ts`.
 */
export interface SharedValidateCache {
    sourceFiles: Map<string, ts.SourceFile>;
}
export declare function createSharedValidateCache(): SharedValidateCache;
export interface SharedValidateResult {
    /** Diagnostics with category Error. */
    errorCount: number;
    fileCount: number;
    /** Human-formatted diagnostics (color + context), empty when clean. */
    formatted: string;
    skipped?: 'no-tsconfig';
}
/**
 * Validates one package in-process, reproducing exactly the program that
 * `package-compile --validate-only` runs via `tsc -p`: the package's own
 * tsconfig (its `lib`, `jsx`, `types`, `paths` — every option is the
 * package's own), the same file set (tsconfig includes minus nested
 * workspace dirs), with `noEmit` and `rootDir` overridden the same way.
 * Only the compiler *host* is shared, for SourceFile reuse across packages.
 */
export declare function validateWorkspaceInProcess(workspaceDir: string, cache: SharedValidateCache): SharedValidateResult;
//# sourceMappingURL=sharedValidate.d.ts.map