json-joy
Version:
Collection of libraries for building collaborative editing apps.
18 lines (17 loc) • 608 B
TypeScript
import { type ITimestampStruct, type IClockVector } from '../../clock';
import { RelativeTimestamp } from './RelativeTimestamp';
declare class ClockTableEntry {
index: number;
clock: ITimestampStruct;
constructor(index: number, clock: ITimestampStruct);
}
export declare class ClockEncoder {
readonly table: Map<number, ClockTableEntry>;
/** Start from 1, as 0 is reserved for system session ID. */
protected index: number;
clock: IClockVector | null;
reset(clock: IClockVector): void;
append(ts: ITimestampStruct): RelativeTimestamp;
toJson(): number[];
}
export {};