import { BatchBufferOptions } from "./types"; /** * A buffer that accumulates items and flushes them in batches. * @typeparam T - The type of items to buffer. */ export default class BatchBuffer { private buffer; private flushHandler; private logger?; private maxSize; private intervalMs; private timer; /** * Creates a new `BatchBuffer` instance. * @param options - The options to configure the buffer. * @throws If the options are invalid. */ constructor(options: BatchBufferOptions); /** * Adds an item to the buffer. * * @param item - The item to add. */ add(item: T): Promise; flush(): Promise; } //# sourceMappingURL=batch-buffer.d.ts.map