UNPKG

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