export type EditOp = { type: 'equal'; a: T; b: T; } | { type: 'replace'; a: T; b: T; } | { type: 'insert'; b: T; } | { type: 'delete'; a: T; }; export interface LevenshteinOptions { equal: (a: T, b: T) => boolean; substitutionCost?: (a: T, b: T) => number; insertCost?: number; deleteCost?: number; } /** * Weighted Levenshtein edit distance (Needleman-Wunsch), computed via O(n*m) * dynamic programming and backtracked into the cheapest sequence of * equal/insert/delete/replace edits. Unlike a plain LCS diff, this allows two * non-equal items to be paired up as a single "replace" rather than always * splitting into an unrelated delete + insert. */ export declare function levenshteinDiff(a: T[], b: T[], options: LevenshteinOptions): EditOp[];