API reference › @evolu/common › local‑first/Protocol › TimestampsBuffer
Defined in: packages/common/src/local-first/Protocol.ts:1047
Properties
add
readonly add: (timestamp: Timestamp) => void;
Defined in: packages/common/src/local-first/Protocol.ts:1048
addInfinite
readonly addInfinite: () => void;
Defined in: packages/common/src/local-first/Protocol.ts:1049
append
readonly append: (buffer: Buffer) => void;
Defined in: packages/common/src/local-first/Protocol.ts:1052
checkpoint
readonly checkpoint: () => () => void;
Defined in: packages/common/src/local-first/Protocol.ts:1061
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:1050
getLength
readonly getLength: () => number;
Defined in: packages/common/src/local-first/Protocol.ts:1051