/**
 * tsconfig-paths.ts — resolves `@/foo` style aliased imports against the nearest
 * `tsconfig.json`, using `get-tsconfig` for `extends`-chain + paths handling.
 *
 * Two-level cache keeps long-running MCP server processes happy:
 *   - `dirToConfigCache`: `${repoRoot}::${importerDir}` → nearest tsconfig.json path
 *     (or null when none found up to repoRoot). Includes repoRoot so the same
 *     importer directory analyzed under different root boundaries does not reuse
 *     a stale tsconfig from another indexing scope.
 *   - `configCache`: tsconfig.json absolute path → parsed { matcher, baseUrl }.
 *
 * Both caches are cleared on `clearTsconfigCache()`. The graph builder calls
 * this at the start of every `index_folder` so config edits between runs take
 * effect.
 *
 * IMPORTANT: when probing `TS_EXTENSIONS`, the empty-string entry that handles
 * exact-file aliases (`paths: { "foo": ["src/foo.ts"] }`) MUST gate on
 * `statSync(candidate).isFile()` — `existsSync` returns true for both files
 * and directories, and a directory match would return the dir path, then fail
 * the downstream `normalizedPaths.get(resolved)` lookup (file-only), silently
 * dropping the edge for `@/components/Button` style aliases pointing at a
 * directory with `index.ts`.
 */
interface ResolvedTsconfig {
    pathsMatcher: ((specifier: string) => string[]) | null;
    baseUrl: string | null;
    configPath: string;
}
/** Clear both caches. Called at the start of `index_folder`. */
export declare function clearTsconfigCache(): void;
/** Walk up from `dir` to `repoRoot`, find nearest `tsconfig.json`.
 * Returns absolute path of the config file, or null if none found.
 * Caches every ancestor visited during the walk under the compound `(repoRoot, dir)`
 * key — sibling lookups under the same parent are O(1) after the first hit. */
declare function findNearestTsconfig(dir: string, repoRoot: string): string | null;
/** Parse a tsconfig.json (with `extends` chain) and build a paths matcher.
 * Returns null on parse error. Caches successful parses only — failures are
 * NOT cached so a user fixing a malformed tsconfig.json mid-session does not
 * stay broken until the next full index_folder. */
declare function loadTsconfig(configPath: string): ResolvedTsconfig | null;
/** Probe candidate path against TS_EXTENSIONS. Returns the first existing FILE
 * (not directory) match, or null. */
declare function probeFile(candidate: string): string | null;
/** Resolve a TS aliased import against the nearest tsconfig.json.
 *
 * @param importerFile  absolute path of the file containing the import
 * @param importPath    raw import specifier (e.g., "@/components/x")
 * @param repoRoot      walk-up termination boundary (absolute path)
 * @returns absolute path of the resolved file, or null when no alias matches
 *          OR no real file exists with any candidate extension. */
export declare function resolveTsAliasedImport(importerFile: string, importPath: string, repoRoot: string): string | null;
export declare const __test: {
    findNearestTsconfig: typeof findNearestTsconfig;
    loadTsconfig: typeof loadTsconfig;
    probeFile: typeof probeFile;
    TS_EXTENSIONS: string[];
    getConfigCacheSize: () => number;
    getDirCacheSize: () => number;
};
export {};
//# sourceMappingURL=tsconfig-paths.d.ts.map