UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

24 lines (23 loc) 826 B
import type { CompactStrDelOp } from '../codec/compact/types'; import { AbstractOp } from './AbstractOp'; import type { OperationStrDel } from '../types'; import { type Path } from '@jsonjoy.com/json-pointer'; import { OPCODE } from '../constants'; /** * @category JSON Patch Extended */ export declare class OpStrDel extends AbstractOp<'str_del'> { readonly pos: number; readonly str: string | undefined; readonly len: number | undefined; constructor(path: Path, pos: number, str: string | undefined, len: number | undefined); op(): "str_del"; code(): OPCODE; deleteLength(): number; apply(doc: unknown): { doc: unknown; old: string; }; toJson(parent?: AbstractOp): OperationStrDel; toCompact(parent: undefined | AbstractOp, verbose: boolean): CompactStrDelOp; }