Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 45x 45x 10x 10x 10x 10x 10x 10x 10x 10x | import {ArrApi, NodeApi} from '../../json-crdt/model/api/nodes'; import type {MvalNode} from './MvalNode'; import type {ExtApi} from '../../json-crdt'; export class MvalApi extends NodeApi<MvalNode> implements ExtApi<MvalNode> { public set(json: unknown): this { const {api, node} = this; const builder = api.builder; const rgaApi = new ArrApi(node.data, api); const length = rgaApi.length(); rgaApi.del(0, length); rgaApi.ins(0, [builder.json(json)]); rgaApi.node.removeTombstones(); return this; } } |