UNPKG

1.58 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/concat-stream`
3
4# Summary
5This package contains type definitions for concat-stream (https://github.com/maxogden/concat-stream).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/concat-stream.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/concat-stream/index.d.ts)
10````ts
11// Type definitions for concat-stream 2.0
12// Project: https://github.com/maxogden/concat-stream
13// Definitions by: Joey Marianer <https://github.com/jmarianer>
14// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
15
16/// <reference types="node" />
17
18import { Writable } from "stream";
19
20declare function concat(cb: (buf: Buffer) => void): Writable;
21declare function concat(opts: { encoding: "buffer" | undefined } | {}, cb: (buf: Buffer) => void): Writable;
22declare function concat(opts: { encoding: "string" }, cb: (buf: string) => void): Writable;
23declare function concat(opts: { encoding: "array" }, cb: (buf: Array<bigint>) => void): Writable;
24declare function concat(opts: { encoding: "uint8array" | "u8" | "uint8" }, cb: (buf: Uint8Array) => void): Writable;
25declare function concat(opts: { encoding: "object" }, cb: (buf: object[]) => void): Writable;
26
27export = concat;
28
29````
30
31### Additional Details
32 * Last updated: Tue, 01 Feb 2022 09:01:36 GMT
33 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
34 * Global values: none
35
36# Credits
37These definitions were written by [Joey Marianer](https://github.com/jmarianer).
38
\No newline at end of file