import { hashContent } from './hash';
import type { SourceFile } from 'typescript';
/**
 * Evict oldest entry if cache exceeds max size
 * Uses O(n) scan instead of O(n log n) sort since we add one entry at a time
 */
export declare function evictOldestEntries(): void;
/**
 * Get or create a cached SourceFile
 * Accepts an optional pre-computed contentHash to avoid re-hashing
 */
export declare function getSourceFile(filePath: string, sourceCode: string, precomputedHash?: number | bigint): SourceFile;
/**
 * Clear the SourceFile cache (useful for testing or memory management)
 */
export declare function clearSourceFileCache(): void;
/**
 * Get the current cache size (useful for debugging)
 */
export declare function getSourceFileCacheSize(): number;
/**
 * Async version of getSourceFile that yields to the event loop for large files
 * Prevents blocking when processing many large files in parallel
 */
export declare function getSourceFileAsync(filePath: string, sourceCode: string, config?: AsyncParseConfig): Promise<SourceFile>;
/**
 * Batch parse multiple files asynchronously with concurrency control
 * Useful for processing many files while keeping the event loop responsive
 */
export declare function batchParseSourceFiles(files: Array<{ filePath: string, sourceCode: string }>, config?: AsyncParseConfig & { concurrency?: number }): Promise<Map<string, SourceFile>>;
/**
 * Check if a file should use async parsing based on size
 */
export declare function shouldUseAsyncParsing(sourceCode: string, config?: AsyncParseConfig): boolean;
/**
 * Get statistics about pending parse operations
 */
export declare function getPendingParseCount(): number;
/**
 * Configuration for async parsing
 */
export declare interface AsyncParseConfig {
  asyncThreshold?: number
  chunkSize?: number
  yieldInterval?: number
}
export { hashContent } from './hash';
