json-joy
Version:
Collection of libraries for building collaborative editing apps.
21 lines (20 loc) • 642 B
TypeScript
import type { CompactMoveOp } from '../codec/compact/types';
import { AbstractOp } from './AbstractOp';
import type { OperationMove } from '../types';
import { type Path } from '@jsonjoy.com/json-pointer';
import { OPCODE } from '../constants';
/**
* @category JSON Patch
*/
export declare class OpMove extends AbstractOp<'move'> {
readonly from: Path;
constructor(path: Path, from: Path);
op(): "move";
code(): OPCODE;
apply(doc: unknown): {
doc: unknown;
old: any;
};
toJson(parent?: AbstractOp): OperationMove;
toCompact(parent: undefined | AbstractOp, verbose: boolean): CompactMoveOp;
}