/**
 * Helpers for approximate ("fuzzy") string matching.
 *
 * A query is considered a match when every one of its characters can be found
 * in the target string while preserving their relative order, even if other
 * characters sit between them. Each match is also given a numeric score where
 * smaller numbers indicate a tighter, more relevant match.
 */
export interface FuzzyMatch {
    matches: boolean;
    score: number;
}
export interface FuzzyScoringConfig {
    gapPenalty: number;
    consecutiveReward: number;
    wordBoundaryReward: number;
    lateMatchPenalty: number;
    swappedTokenPenalty: number;
}
export interface FuzzyMatcherStrategy {
    match(query: string, text: string, config: FuzzyScoringConfig): FuzzyMatch;
}
export declare function fuzzyMatch(query: string, text: string): FuzzyMatch;
/**
 * Keep only the items whose text fuzzy-matches the query, ordered so the
 * strongest matches come first. The query may contain several whitespace-
 * separated tokens; an item is only retained when it matches all of them.
 */
export declare function fuzzyFilter<T>(items: T[], query: string, getText: (item: T) => string): T[];
