@types/stream-to-promise
TypeScript icon, indicating that this package has built-in type declarations

2.2.4 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/stream-to-promise

Weekly Downloads

8,471

Version

2.2.4

License

MIT

Unpacked Size

3.79 kB

Total Files

5

Last publish

Collaborators

  • types