Skip to content

CrdtFactory

CrdtFactory<C> = () => C

Defined in: src/crdt/DistributedData.ts:111

Empty-CRDT factory. Callers pass this to update(key, factory, fn) so the extension can materialize a brand-new CRDT for a key that doesn’t exist yet — without DistributedData itself needing to know about every CRDT type.

GCounter.empty satisfies CrdtFactory () => ORSet.empty() satisfies CrdtFactory<ORSet>

C extends Crdt<C>

C