UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

24 lines (23 loc) 687 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExtNode = void 0; const clock_1 = require("../../json-crdt-patch/clock"); class ExtNode { constructor(data) { this.data = data; this.api = undefined; this.id = data.id; } children(callback) { } child() { return this.data; } container() { return this.data.container(); } // ---------------------------------------------------------------- Printable toString(tab, parentId) { return this.name() + (parentId ? ' ' + (0, clock_1.printTs)(parentId) : '') + ' ' + this.data.toString(tab); } } exports.ExtNode = ExtNode;