UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

16 lines (15 loc) 774 B
import { AbstractRga } from './nodes/rga'; import type { JsonNode } from './nodes'; import type { ITimestampStruct } from '../json-crdt-patch/clock'; import type { Model } from './model'; export declare const updateId: (state: number, id: ITimestampStruct) => number; export declare const updateRga: (state: number, node: AbstractRga<unknown>) => number; /** * Updates the hash state with the given JSON CRDT node. * @param state Current hash state. * @param node JSON CRDT node from which to compute the hash. */ export declare const updateNode: (state: number, node: JsonNode) => number; export declare const hashId: (id: ITimestampStruct) => number; export declare const hashNode: (node: JsonNode) => number; export declare const hashModel: (model: Model) => number;