File: index.d.ts

package info (click to toggle)
node-end-of-stream 1.4.4%2B~1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 112 kB
  • sloc: javascript: 188; makefile: 2
file content (25 lines) | stat: -rwxr-xr-x 699 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Type definitions for end-of-stream 1.4
// Project: https://github.com/mafintosh/end-of-stream
// Definitions by: Sami Kukkonen <https://github.com/strax>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node"/>

interface Options {
  readable?: boolean | undefined;
  writable?: boolean | undefined;
  error?: boolean | undefined;
}
type Stream = NodeJS.ReadableStream | NodeJS.WritableStream;
type Callback = (error?: Error | null) => void;
declare function eos(
  stream: Stream,
  callback?: Callback
): () => void;
declare function eos(
  stream: Stream,
  options: Options,
  callback?: Callback
): () => void;
declare namespace eos {
}
export = eos;