import * as ts from 'typescript/lib/tsserverlibrary'; /** * Cache for file-level diagnostics * * PERFORMANCE OPTIMIZATION: * - Caches complete diagnostic results per file * - Uses file content hash as key (detects actual changes) * - LRU eviction (keep most recently used files) * - Provides 95%+ speedup for unchanged files * * Strategy: * - On file validation, check if content hash matches cached hash * - If match: return cached diagnostics instantly (no AST parsing, no validation) * - If no match: validate fully and cache result */ export declare class FileDiagnosticCache { private cache; private maxSize; constructor(maxSize?: number); /** * Get cached diagnostics for a file * Returns undefined if not cached or content changed */ get(fileName: string, fileContent: string): ts.Diagnostic[] | undefined; /** * Cache diagnostics for a file */ set(fileName: string, fileContent: string, diagnostics: ts.Diagnostic[]): void; /** * Invalidate cache for a specific file */ invalidate(fileName: string): void; /** * Clear entire cache */ clear(): void; /** * Get cache statistics */ getStats(): { size: number; maxSize: number; }; /** * Hash file content for comparison * Uses MD5 for speed (security not needed here) */ private hashContent; } //# sourceMappingURL=FileDiagnosticCache.d.ts.map