UNPKG

1.16 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/end-of-stream`
3
4# Summary
5This package contains type definitions for end-of-stream (https://github.com/mafintosh/end-of-stream).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/end-of-stream.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/end-of-stream/index.d.ts)
10````ts
11/// <reference types="node"/>
12
13interface Options {
14 readable?: boolean | undefined;
15 writable?: boolean | undefined;
16 error?: boolean | undefined;
17}
18type Stream = NodeJS.ReadableStream | NodeJS.WritableStream;
19type Callback = (error?: Error | null) => void;
20declare function eos(
21 stream: Stream,
22 callback?: Callback,
23): () => void;
24declare function eos(
25 stream: Stream,
26 options: Options,
27 callback?: Callback,
28): () => void;
29declare namespace eos {
30}
31export = eos;
32
33````
34
35### Additional Details
36 * Last updated: Mon, 06 Nov 2023 22:41:05 GMT
37 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
38
39# Credits
40These definitions were written by [Sami Kukkonen](https://github.com/strax).
41
\No newline at end of file