/** * EarlyTerminationSearch - Utility for parallel searches with early termination * * Optimizes search operations by terminating when exact matches are found, * while still providing comprehensive results for diagnostics. */ export interface SearchResult { success: boolean; result: T | null; error?: string; } export interface EarlyTerminationResult { matches: T[]; exactMatch?: T; totalSearches: number; completedSearches: number; failures: Array<{ index: number; error: string; }>; earlyTerminationTriggered: boolean; performanceGain?: string; } export declare class EarlyTerminationSearch { /** * Perform parallel searches with early termination when exact match found * @param searches Array of search functions to execute * @param isExactMatch Function to determine if a result is an exact match * @param options Configuration options */ static executeWithEarlyTermination(searches: Array<() => Promise>, isExactMatch: (result: T) => boolean, options?: { operationName?: string; timeoutAfterExactMatch?: number; maxParallelSearches?: number; }): Promise>; /** * Process batch results and update the main results object */ private static processBatchResults; } //# sourceMappingURL=EarlyTerminationSearch.d.ts.map