export type DocumentSequenceDiff = { kind: 'equal'; left: T[]; right: T[]; } | { kind: 'delete'; left: T[]; right: []; } | { kind: 'insert'; left: []; right: T[]; }; export type DocumentSequenceAlignment = { kind: 'equal' | 'substitute'; left: T; right: T; } | { kind: 'delete'; left: T; right: null; } | { kind: 'insert'; left: null; right: T; }; /** * Computes a deterministic LCS diff while bounding the allocated matrix. * Callers can fall back to one replacement when the requested matrix is too * large instead of allowing adversarial documents to allocate without limit. */ export declare function boundedDocumentSequenceDiff(left: readonly T[], right: readonly T[], equal: (left: T, right: T) => boolean, maximumCells: number): DocumentSequenceDiff[] | null; /** * Aligns document blocks with a weighted substitution cost. A substitution * cost below two pairs related blocks; a cost of two or more prefers an * explicit deletion plus insertion. */ export declare function boundedDocumentSequenceAlignment(left: readonly T[], right: readonly T[], substitutionCost: (left: T, right: T) => number, maximumCells: number): DocumentSequenceAlignment[] | null;