/** * Write batcher for optimizing file I/O operations * Collects multiple file writes and executes them in batches to reduce I/O overhead */ export declare class WriteBatcher { private writeQueue; private readonly batchSize; private readonly batchDelay; private flushTimer; private flushing; constructor(batchSize?: number, batchDelay?: number); /** * Add a file write to the batch queue */ addWrite(fileName: string, data: string): Promise; /** * Flush all pending writes */ flush(): Promise; /** * Get the current queue length */ getQueueLength(): number; /** * Get queue statistics for visualization */ getQueueStats(): { queueLength: number; batchSize: number; isFlushing: boolean; }; /** * Schedule the next flush (extracted for testability) * This method is called from the setTimeout callback to handle errors * @private */ private scheduleNextFlush; /** * Test helper to check if flush timer is set * This is only used in tests to verify timer scheduling for coverage * @returns true if flush timer is set, false otherwise */ hasFlushTimer(): boolean; /** * Flush all remaining writes in batches (for final flush) * Processes writes in chunks to avoid EMFILE (too many open files) errors */ flushAll(): Promise; /** * Wait for all pending writes to complete * More aggressive flushing to prevent blocking */ waitForCompletion(): Promise; } /** * Serialize JSON to YAML or JSON string */ export declare function serializeData(json: unknown, format: string): string; //# sourceMappingURL=writeBatcher.d.ts.map