UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

29 lines (28 loc) 1.43 kB
import * as nodes from '../../../nodes'; import { ClockDecoder } from '../../../../json-crdt-patch/codec/clock/ClockDecoder'; import { CrdtReader } from '../../../../json-crdt-patch/util/binary/CrdtReader'; import { type ITimestampStruct } from '../../../../json-crdt-patch/clock'; import { Model } from '../../../model/Model'; import { CborDecoderBase } from '@jsonjoy.com/json-pack/lib/cbor/CborDecoderBase'; export declare class Decoder extends CborDecoderBase<CrdtReader> { protected doc: Model; protected clockDecoder?: ClockDecoder; protected time: number; constructor(); decode(data: Uint8Array, model?: Model): Model; protected decodeClockTable(): void; protected ts(): ITimestampStruct; protected cRoot(): nodes.JsonNode; protected cNode(): nodes.JsonNode; protected cCon(id: ITimestampStruct, length: number): nodes.ConNode; protected cVal(id: ITimestampStruct): nodes.ValNode; protected cObj(id: ITimestampStruct, length: number): nodes.ObjNode; protected cObjChunk(obj: nodes.ObjNode): void; protected cVec(id: ITimestampStruct, length: number): nodes.VecNode; protected cStr(id: ITimestampStruct, length: number): nodes.StrNode; private cStrChunk; protected cBin(id: ITimestampStruct, length: number): nodes.BinNode; private cBinChunk; protected cArr(id: ITimestampStruct, length: number): nodes.ArrNode; private readonly cArrChunk; }