/** * Small closest-match helper used to power "Did you mean …?" quick fixes. * * Implements an iterative Levenshtein edit distance and a conservative * suggestion threshold so that only genuinely close typos are offered. */ /** * Compute the Levenshtein edit distance between two strings. * @param a - First string. * @param b - Second string. * @returns The minimum number of single-character edits to turn `a` into `b`. */ export declare function levenshtein(a: string, b: string): number; /** * Return the candidate closest to `word` (case-insensitive) when it is within a * conservative typo threshold, or null when nothing is close enough. * * The threshold scales with the word length: very short words allow at most one * edit, longer words up to two. This avoids suggesting unrelated names. * @param word - The unknown word typed by the user. * @param candidates - Known valid names to match against. * @returns The closest candidate (in its original casing), or null. */ export declare function closestMatch(word: string, candidates: Iterable): string | null; //# sourceMappingURL=closestMatch.d.ts.map