UNPKG

399 BTypeScriptView Raw
1/// <reference types="node" />
2import { Readable } from 'stream';
3/**
4 * Writes readable stream to the given location by properly cleaning up readable
5 * and writable streams in case of any errors. Also an optional data listener
6 * can listen for the `data` event.
7 */
8export declare function streamFile(readStream: Readable, location: string, dataListener?: (line: Buffer) => void): Promise<void>;