fn
compareOpId
testedTotal order over op ids: higher clock wins; ties broken by site id. This is the deterministic tie-break every replica agrees on, so LWW and RGA converge.
Signature
ts
export function compareOpId(a: OpId, b: OpId): number{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
a | OpId | — |
b | OpId | — |
Returns
number