跳转到内容
简体中文

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