hackpro-sdk
Version:
42 lines (41 loc) • 1.82 kB
TypeScript
/// <reference types="node" />
import { Writable } from 'readable-stream';
import { BlockDevice } from './source-destination/block-device';
export declare class BlockWriteStream extends Writable {
private destination;
firstBytesToKeep: number;
private maxRetries;
bytesWritten: number;
private _firstBuffers;
private _buffers;
private _bytes;
constructor(destination: BlockDevice, firstBytesToKeep?: number, maxRetries?: number);
private writeChunk;
private writeBuffers;
private __write;
_write(buffer: Buffer, _encoding: string, callback: (error: Error | undefined) => void): void;
private __final;
/**
* @summary Write buffered data before a stream ends, called by stream internals
*/
_final(callback: (error?: Error | void) => void): void;
}
export declare const ProgressBlockWriteStream: {
new (...args: any[]): {
_attributeValue: number;
_attributeDelta: number;
addListener(event: string | symbol, listener: Function): any;
on(event: string | symbol, listener: Function): any;
once(event: string | symbol, listener: Function): any;
prependListener(event: string | symbol, listener: Function): any;
prependOnceListener(event: string | symbol, listener: Function): any;
removeListener(event: string | symbol, listener: Function): any;
removeAllListeners(event?: string | symbol | undefined): any;
setMaxListeners(n: number): any;
getMaxListeners(): number;
listeners(event: string | symbol): Function[];
emit(event: string | symbol, ...args: any[]): boolean;
eventNames(): (string | symbol)[];
listenerCount(type: string | symbol): number;
};
} & typeof BlockWriteStream;