Skip to content

Function: lwwSet()

lwwSet<T>(clientID, value, ts, current?): LwwRegister<T>

Defined in: core/src/schema/crdt.ts:140

Set a new value. Callers supply their own timestamp (defaulted to Date.now() at the call site — plasma doesn’t reach for it to keep the primitive pure and easily mockable). Ties on ts resolve by clientID lexicographic order, which is a stable tiebreak.

T

string

T

number

LwwRegister<T> | null

LwwRegister<T>