Constructors
constructor
- new LWWRegister<T>(state): LWWRegister<T>
Parameters
- state: LWWRegisterState<T>
Properties
state
state: LWWRegisterState<T> Accessors
timestamp
- get timestamp(): bigint
Returns bigint
Methods
merge
- merge(incoming): LWWRegisterState<T>
Parameters
- incoming: LWWRegisterState<T>
Returns LWWRegisterState<T>
set
- set(value): void
Returns void
a CRDT implementation. Uses timestamps to resolve conflicts when updating the value (last write wins) mostly based on https://jakelazaroff.com/words/an-interactive-intro-to-crdts/