jsondiffpatch
Version:
JSON diff & patch (object and array diff, text diff, multiple output formats)
19 lines (18 loc) • 955 B
TypeScript
import type Context from "./contexts/context.js";
import type DiffContext from "./contexts/diff.js";
import type PatchContext from "./contexts/patch.js";
import type ReverseContext from "./contexts/reverse.js";
import dateReviver from "./date-reviver.js";
import DiffPatcher from "./diffpatcher.js";
import type { Delta, Options } from "./types.js";
export { dateReviver, DiffPatcher };
export type * from "./types.js";
export type { Context, DiffContext, PatchContext, ReverseContext };
export declare function create(options?: Omit<Options, "textDiff"> & {
textDiff?: Omit<Options["textDiff"], "diffMatchPatch">;
}): DiffPatcher;
export declare function diff(left: unknown, right: unknown): Delta;
export declare function patch(left: unknown, delta: Delta): unknown;
export declare function unpatch(right: unknown, delta: Delta): unknown;
export declare function reverse(delta: Delta): Delta;
export declare function clone(value: unknown): unknown;