json-joy
Version:
Collection of libraries for building collaborative editing apps.
19 lines (18 loc) • 656 B
TypeScript
import { ValNode } from '../val/ValNode';
import type { Model } from '../../model/Model';
import type { ITimestampStruct } from '../../../json-crdt-patch/clock';
import type { JsonNode } from '../types';
/**
* The root of a JSON CRDT document. {@link RootNode} is a {@link ValNode} with
* a special `0.0` ID, which is always the same. It is used to represent the
* root of a document.
*
* @category CRDT Node
*/
export declare class RootNode<Value extends JsonNode = JsonNode> extends ValNode<Value> {
/**
* @param val Latest value of the document root.
*/
constructor(doc: Model<any>, val: ITimestampStruct);
name(): string;
}