UNPKG

@types/stream-to-promise

Version:
37 lines (28 loc) 1.24 kB
# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stream-to-promise/index.d.ts) ````ts /// <reference types="node"/> import Stream = require("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: Fri, 24 Oct 2025 04:02:41 GMT * Dependencies: [@types/node](https://npmjs.com/package/@types/node) # Credits These definitions were written by [Alorel](https://github.com/Alorel).