UNPKG

ipull

Version:

The only file downloader you'll ever need. For node.js and the browser, CLI and library for fast and reliable file downloads.

21 lines (20 loc) 677 B
export type BytesWriteDebounceOptions = { maxTime: number; maxSize: number; writev: (index: number, buffers: Uint8Array[]) => Promise<void>; }; export declare class BytesWriteDebounce { private _options; private _writeChunks; private _lastWriteTime; private _totalSizeOfChunks; private _checkWriteInterval; private _abortSleep; private _finished; constructor(_options: BytesWriteDebounceOptions); addChunk(index: number, buffers: Uint8Array[]): Promise<void>; private _writeIfNeeded; private checkIfWriteNeededInterval; writeAll(): Promise<void[]> | undefined; writeAllAndFinish(): Promise<void[]> | undefined; }