UNPKG

@fishan/myers-core-diff

Version:

A high-performance core diff engine based on Myers' algorithm, with plugin support for custom strategies (e.g., Patience, Preserve Structure).

22 lines (21 loc) 799 B
/** * @license * Copyright (c) 2025, Internal Implementation * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import { MyersCoreDiff } from './myers_core_diff.js'; /** * Registers the Patience Diff strategy with the MyersCoreDiff engine. * * Adds a new diff strategy named `'patienceDiff'` that can be selected * by other components or algorithms using the engine. * * @param {typeof MyersCoreDiff} CoreEngine - The MyersCoreDiff class reference. * @returns {void} * @example * registerPatienceDiffStrategy(MyersCoreDiff); * const result = MyersCoreDiff.runStrategy('patienceDiff', oldTokens, newTokens); */ export declare function registerPatienceDiffStrategy(CoreEngine: typeof MyersCoreDiff): void;