UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

21 lines (20 loc) 650 B
import type { CompactIncOp } from '../codec/compact/types'; import { AbstractOp } from './AbstractOp'; import type { OperationInc } from '../types'; import { type Path } from '@jsonjoy.com/json-pointer'; import { OPCODE } from '../constants'; /** * @category JSON Patch Extended */ export declare class OpInc extends AbstractOp<'inc'> { readonly inc: number; constructor(path: Path, inc: number); op(): "inc"; code(): OPCODE; apply(doc: unknown): { doc: unknown; old: unknown; }; toJson(parent?: AbstractOp): OperationInc; toCompact(parent: undefined | AbstractOp, verbose: boolean): CompactIncOp; }