UNPKG

1.39 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// Type definitions for end-of-stream 1.4
12// Project: https://github.com/mafintosh/end-of-stream
13// Definitions by: Sami Kukkonen <https://github.com/strax>
14// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
15/// <reference types="node"/>
16
17interface Options {
18 readable?: boolean | undefined;
19 writable?: boolean | undefined;
20 error?: boolean | undefined;
21}
22type Stream = NodeJS.ReadableStream | NodeJS.WritableStream;
23type Callback = (error?: Error | null) => void;
24declare function eos(
25 stream: Stream,
26 callback?: Callback
27): () => void;
28declare function eos(
29 stream: Stream,
30 options: Options,
31 callback?: Callback
32): () => void;
33declare namespace eos {
34}
35export = eos;
36
37````
38
39### Additional Details
40 * Last updated: Tue, 06 Jul 2021 19:03:13 GMT
41 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
42 * Global values: none
43
44# Credits
45These definitions were written by [Sami Kukkonen](https://github.com/strax).
46
\No newline at end of file