json-joy
Version:
Collection of libraries for building collaborative editing apps.
23 lines (22 loc) • 790 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';
import type { IMessagePackEncoder } from '@jsonjoy.com/json-pack/lib/msgpack';
/**
* @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;
encode(encoder: IMessagePackEncoder, parent?: AbstractOp): void;
}