UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

13 lines (12 loc) 540 B
import type { Op } from '../json-patch/op'; /** * Takes array of proposed patches and transforms them against an array of * already accepted patches. * * @param accepted Array of already accepted operations. * @param proposed Array of proposed operations. Proposed operations are mutated inline. * @param acceptedWins Whether accepted operation should win on when paths match exactly. * * @returns Array of transformed changes */ export declare const transform: (accepted: readonly Op[], proposed: readonly Op[]) => readonly Op[];