Skip to content

DataStoreReplica

In-memory CRDT state. Exported operations can be joined in any order, repeatedly.

Import:

import { DataStoreReplica } from '@mnaoumov/obsidian-lib/data-stores/data-store-replica';

Signature:

export class DataStoreReplica

Constructor

new DataStoreReplica(kind: DataStoreMergeKind)

Creates an empty replica.

Methods

MethodReturnsDescription
apply(value)voidValidates and joins one journal or snapshot operation.
entries()[string, unknown][]Reads visible records, detached from internal state.
export()DataStoreOperation[]Exports mergeable state, retaining tombstones for late or retired replicas.
get(key)unknownReads a register or set membership without enumerating register keys.
observedTags(key)string[]Finds additions observed for a set member, for an observed removal.