/** * VectorClock -- causality tracking for distributed systems. * * @module */ interface VectorClockShape { readonly _tag: 'VectorClock'; readonly entries: ReadonlyMap; } /** * VectorClock — per-peer counter algebra for causal ordering. * Pairs with {@link HLC} when you need exact happens-before rather than HLC's * hybrid ordering. */ export declare const VectorClock: { /** Build an empty vector clock. */ make: () => VectorClockShape; /** Build a vector clock from an existing `Record`. */ from: (entries: Record) => VectorClockShape; /** Read the counter for a single peer. */ get: (vc: VectorClockShape, peerId: string) => number; /** Increment the counter for the given peer, returning a new clock. */ tick: (vc: VectorClockShape, peerId: string) => VectorClockShape; /** Pointwise-max merge of two clocks. */ merge: (a: VectorClockShape, b: VectorClockShape) => VectorClockShape; /** `true` iff `a` strictly happens-before `b`. */ happensBefore: (a: VectorClockShape, b: VectorClockShape) => boolean; /** `true` iff `a` and `b` are causally concurrent. */ concurrent: (a: VectorClockShape, b: VectorClockShape) => boolean; /** Exact structural equality. */ equals: (a: VectorClockShape, b: VectorClockShape) => boolean; /** `-1 | 0 | 1` comparator suitable for `sort`; `0` when concurrent. */ compare: (a: VectorClockShape, b: VectorClockShape) => -1 | 0 | 1; /** Convert to a plain `Record`. */ toObject: (vc: VectorClockShape) => Record; /** List peers known to the clock. */ peers: (vc: VectorClockShape) => string[]; /** Number of peers. */ size: (vc: VectorClockShape) => number; }; export declare namespace VectorClock { /** Structural shape of a vector clock: a `Map` wrapper. */ type Shape = VectorClockShape; } export {}; //# sourceMappingURL=vector-clock.d.ts.map