import type { Project } from '../utils/ts-morph.ts'; export type ProgramCacheDependency = { kind: 'file'; path: string; } | { kind: 'directory'; path: string; } | { kind: 'const'; name: string; version: string; } | { kind: 'cache'; filePath: string; cacheName: string; }; export interface ProgramCacheRuntimeOptions { maxEntries?: number; } export declare function configureAnalysisCacheRuntime(options: ProgramCacheRuntimeOptions): void; export declare function resetAnalysisCacheRuntimeConfiguration(): void; /** * Create (or reuse) a lazily-filled, per-file cache for the given program. This is useful * for caching expensive computations that are specific to a file in a project. */ export declare function createProgramFileCache(project: Project, fileName: string, cacheName: string, compute: () => Type | Promise, options?: { deps?: ProgramCacheDependency[] | ((value: Type) => ProgramCacheDependency[]); }): Promise; /** Invalidates cached analysis results. */ export declare function invalidateProgramFileCache(project: Project, filePath?: string): void; export declare function invalidateProgramFileCache(project: Project, filePath?: string, cacheName?: string): void; export declare function invalidateProgramFileCachePaths(project: Project, paths: Iterable): void;