GCounterMapOptions
Este conteúdo não está disponível em sua língua ainda.
GCounterMapOptions<
K> =object
Defined in: src/crdt/GCounterMap.ts:27
Map of grow-only counters — Map<K, GCounter> with a CRDT merge
that takes the per-key max across replicas. The natural fit for
“per-tag event count”, “per-route hit counter”, “per-user
impression count” — anything where you want a separate counter per
key but don’t want to manage one CRDT per dimension by hand.
const m = GCounterMap.empty
Element identity. Same JSON-stringify default + identity
override pattern as GSet / ORSet — necessary when keys are
BigInt, Map, or other types that don’t round-trip through
JSON.stringify. See GSet for the failure modes.
Type Parameters
Section titled “Type Parameters”K
Properties
Section titled “Properties”identity?
Section titled “identity?”
readonlyoptionalidentity?: (k) =>string
Defined in: src/crdt/GCounterMap.ts:29
Custom identity for non-JSON-serialisable keys. See class doc.
Parameters
Section titled “Parameters”K
Returns
Section titled “Returns”string
