R
fn

compareOpId

tested

Total 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

ParameterTypeDescription
aOpId
bOpId

Returns

number