API reference › @evolu/common › local‑first/Protocol › TimestampsBuffer
Defined in: packages/common/src/local-first/Protocol.ts:1115
Properties
add
readonly add: (timestamp: Timestamp) => void;
Defined in: packages/common/src/local-first/Protocol.ts:1116
addInfinite
readonly addInfinite: () => void;
Defined in: packages/common/src/local-first/Protocol.ts:1117
append
readonly append: (buffer: Buffer) => void;
Defined in: packages/common/src/local-first/Protocol.ts:1120
checkpoint
readonly checkpoint: () => () => void;
Defined in: packages/common/src/local-first/Protocol.ts:1129
Returns a function that restores the buffer, in constant time, to the state it had when this was called, discarding every timestamp added since.
A restore function can be called repeatedly. It is valid until the buffer is restored to an earlier checkpoint.
getCount
readonly getCount: () => number & Brand<"NonNaN"> & Brand<"Finite"> & Brand<"Int"> & Brand<"NonNegative">;
Defined in: packages/common/src/local-first/Protocol.ts:1118
getLength
readonly getLength: () => number;
Defined in: packages/common/src/local-first/Protocol.ts:1119