json-joy
Version:
Collection of libraries for building collaborative editing apps.
21 lines (20 loc) • 866 B
TypeScript
import type { CompactTypeOp } from '../codec/compact/types';
import { AbstractPredicateOp } from './AbstractPredicateOp';
import type { OperationType, JsonPatchTypes } from '../types';
import { type Path } from '@jsonjoy.com/json-pointer';
import { OPCODE } from '../constants';
import type { AbstractOp } from './AbstractOp';
import type { IMessagePackEncoder } from '@jsonjoy.com/json-pack/lib/msgpack';
/**
* @category JSON Predicate
*/
export declare class OpType extends AbstractPredicateOp<'type'> {
readonly value: JsonPatchTypes;
constructor(path: Path, value: JsonPatchTypes);
op(): "type";
code(): OPCODE;
test(doc: unknown): boolean;
toJson(parent?: AbstractOp): OperationType;
toCompact(parent: undefined | AbstractOp, verbose: boolean): CompactTypeOp;
encode(encoder: IMessagePackEncoder, parent?: AbstractOp): void;
}