import fs from "node:fs"; /** Filesystem facts required to discover an implicit TypeScript project. */ export interface TtscProjectDiscoveryFilesystem { /** Override path parsing when the observed filesystem is not the host. */ platform?: NodeJS.Platform; /** Read metadata while following links, like an ordinary config-file open. */ stat(location: string): Pick & Partial>; } /** Directory enumeration required to discover every implicit child project. */ export interface TtscProjectTreeDiscoveryFilesystem extends TtscProjectDiscoveryFilesystem { /** Enumerate one lexical directory and identify child directory links. */ readdir(location: string): readonly (Pick & Partial>)[]; /** Resolve physical directory identity for cycle-safe linked traversal. */ realpath?(location: string): string; } /** One exact file predicate consulted by nearest-project discovery. */ export interface TtscProjectTsconfigCandidate { readonly file: string; readonly fileExists: boolean; } /** The selected config and the predicates that selected it. */ export interface TtscProjectTsconfigDiscovery { readonly candidates: readonly TtscProjectTsconfigCandidate[]; readonly file: string | undefined; } /** Directories deliberately outside the shared lexical project walk. */ export declare function isIgnoredProjectDirectory(name: string): boolean; /** * Find the nearest ancestor `tsconfig.json` that is proven to be a file. * * A directory, broken link, permission failure, or any other unprovable * candidate cannot terminate the walk. `stat` deliberately follows links, so a * link to a regular file retains its lexical config spelling. */ export declare function findNearestProjectTsconfig(startDirectory: string, filesystem?: TtscProjectDiscoveryFilesystem): string | undefined; /** * Find the nearest config and retain the exact predicate observations used to * select it. A cache host must not rediscover these candidates later: a file * can disappear only for selection and return before that second observation. */ export declare function discoverNearestProjectTsconfig(startDirectory: string, filesystem?: TtscProjectDiscoveryFilesystem): TtscProjectTsconfigDiscovery; /** * Find every regular `tsconfig.json` below one project root. * * The traversal retains lexical project spellings while following child * directory links and junctions. A physical ancestor set cuts cycles without * collapsing two independent aliases of the same project. An incomplete * traversal is reported rather than returned as a complete project map, so a * cache-key caller can refuse reuse. */ export declare function findProjectTsconfigs(root: string, filesystem?: TtscProjectTreeDiscoveryFilesystem): { candidates: string[]; complete: boolean; files: string[]; };