/** * A timestamp used to break ties during collaborative editing. * If multiple users edit a property at the same time, the edit with the last timestamp "wins". * * Specifically, `CollabTimestamp` is a [Lamport timestamp](https://en.wikipedia.org/wiki/Lamport_timestamp), * consisting of a logical clock and a tiebreaker (`replicaId`, a UUID that is created fresh for each diagram). */ export type CollabTimestamp = [clock: number, replicaId: string]; /** * Returns whether the incoming timestamp wins over the existing timestamp. * * In the DiagramModel, timestamps that have never been set are left null; * `timestampWins` treats that as an "initial timestamp" that loses to all LogicalTimestamps. */ export declare function timestampWins(incoming: CollabTimestamp, existing: CollabTimestamp | null | undefined): boolean; /** * A nested collection of CollabTimestamps associated to a ValueSet. * @see ValueSet */ export type CollabTimestampSet = { [key: string]: CollabTimestamp | CollabTimestampSet; };