import { VerifiedState } from "../coValueCore/verifiedState.js"; import { CoValueKnownState } from "../knownState.js"; import { NewContentMessage } from "../sync.js"; /** * This queue is used to batch the sync of local transactions while preserving the order of updates between CoValues. * * We need to preserve the order of updates between CoValues to keep the state always consistent in case of shutdown in the middle of a sync. * * Examples: * 1. When we extend a Group we need to always ensure that the parent group is persisted before persisting the extension transaction. * 2. If we do multiple updates on the same CoMap, the updates will be batched because it's safe to do so. */ export declare class LocalTransactionsSyncQueue { private readonly sync; private batch; private lastUpdatedValue; private lastUpdatedValueKnownState; constructor(sync: (content: NewContentMessage) => void); syncTransaction: (coValue: VerifiedState, knownStateBefore: CoValueKnownState) => void; private addContentToBatch; private nextBatchScheduled; scheduleNextBatch(): void; private dirtyCoValuesTrackingSets; /** * It starts tracking all changed CoValues. Returns a `done()` function that returns a set of coValues' ids that have been modified since the start. * * @example * ```ts * const tracking = node.syncManager.trackDirtyCoValues(); * // Any CoValue mutation * const tracked = tracking.done(); * console.log("CoValue mutated: " Array.from(tracked)) * ``` */ trackDirtyCoValues: () => { done: () => Set<`co_z${string}`>; }; } //# sourceMappingURL=LocalTransactionsSyncQueue.d.ts.map