mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
22 lines
720 B
TypeScript
22 lines
720 B
TypeScript
// Type definitions for stream-to-promise 2.2
|
|
// Project: https://github.com/bendrucker/stream-to-promise
|
|
// Definitions by: Alorel <https://github.com/Alorel>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/// <reference types="node"/>
|
|
|
|
/**
|
|
* 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): Promise<Buffer>;
|
|
|
|
/**
|
|
* Return s promise which resolves when the input stream ends
|
|
* @param stream The input stream
|
|
*/
|
|
declare function streamToPromise(stream: NodeJS.WritableStream): Promise<void>;
|
|
|
|
export = streamToPromise;
|