import { Types } from 'ably'; import type { CursorUpdate } from './types.js'; import type { CursorsOptions } from './types.js'; type OutgoingBuffer = { cursor: Pick; offset: number; }; export default class CursorBatching { readonly outboundBatchInterval: CursorsOptions['outboundBatchInterval']; outgoingBuffer: OutgoingBuffer[]; batchTime: number; hasMovement: boolean; isRunning: boolean; shouldSend: boolean; bufferStartTimestamp: number; constructor(outboundBatchInterval: CursorsOptions['outboundBatchInterval']); pushCursorPosition(channel: Types.RealtimeChannelPromise, cursor: Pick): void; setShouldSend(shouldSend: boolean): void; setBatchTime(batchTime: number): void; private pushToBuffer; private publishFromBuffer; private batchToChannel; } export {};