import { ORIGIN } from '../../../json-crdt-patch/constants';
import { ValNode } from '../val/ValNode';
/**
 * 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 class RootNode extends ValNode {
    /**
     * @param val Latest value of the document root.
     */
    constructor(doc, val) {
        super(doc, ORIGIN, val);
    }
    name() {
        return 'root';
    }
}
//# sourceMappingURL=RootNode.js.map