Installation
npm install --save @types/stream-to-promise
Summary
This package contains type definitions for stream-to-promise (https://github.com/bendrucker/stream-to-promise).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stream-to-promise.
index.d.ts
/// <reference types="node"/>
import * as Stream from "stream";
/**
* Return a promise which resolves when the input stream ends
* @param stream The input stream
* @returns A promise containing the stream output as a buffer
*/
declare function streamToPromise(stream: NodeJS.ReadableStream | Stream.Readable): Promise<Buffer>;
/**
* Return s promise which resolves when the input stream ends
* @param stream The input stream
*/
declare function streamToPromise(stream: NodeJS.WritableStream | Stream.Writable): Promise<void>;
export = streamToPromise;
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: @types/node
Credits
These definitions were written by Alorel.