combined-stream/ 000755 001751 000177 0000000000 14522265601 015613 5 ustar 00runner 000000 000000 14522265601 14522265601 combined-stream/LICENSE 000644 001751 000177 0000002165 14522265601 016624 0 ustar 00runner 000000 000000 14522265601 14522265601 MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
combined-stream/README.md 000644 001751 000177 0000004616 14522265601 017105 0 ustar 00runner 000000 000000 14522304647 14522265601 # Installation
> `npm install --save @types/combined-stream`
# Summary
This package contains type definitions for combined-stream (https://github.com/felixge/node-combined-stream).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/combined-stream.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/combined-stream/index.d.ts)
````ts
///
import { Stream } from "stream";
type Appendable = NodeJS.ReadableStream | NodeJS.WritableStream | Buffer | string | NextFunction;
type NextFunction = (next: (stream: Appendable) => any) => any;
interface Options {
maxDataSize?: number | undefined;
pauseStreams?: boolean | undefined;
}
declare class CombinedStream extends Stream implements Options {
readonly writable: boolean;
readonly readable: boolean;
readonly dataSize: number;
maxDataSize: number;
pauseStreams: boolean;
append(stream: Appendable): this;
write(data: any): void;
pause(): void;
resume(): void;
end(): void;
destroy(): void;
// private properties
_released: boolean;
// @TODO it should be a type of Array<'delayed-stream' instance | Buffer | string>
_streams: Array;
_currentStream: Stream | Buffer | string | null;
_getNext(): void;
_pipeNext(): void;
_handleErrors(stream: NodeJS.EventEmitter): void;
_reset(): void;
_checkDataSize(): void;
_updateDataSize(): void;
_emitError(error: Error): void;
// events
on(event: "close" | "end" | "resume" | "pause", cb: () => void): this;
on(event: "error", cb: (err: Error) => void): this;
on(event: "data", cb: (data: any) => void): this;
once(event: "close" | "end" | "resume" | "pause", cb: () => void): this;
once(event: "error", cb: (err: Error) => void): this;
once(event: "data", cb: (data: any) => void): this;
static create(options?: Options): CombinedStream;
static isStreamLike(stream: any): stream is Stream;
}
export = CombinedStream;
````
### Additional Details
* Last updated: Mon, 06 Nov 2023 22:41:05 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
# Credits
These definitions were written by [Felix Geisendörfer](https://github.com/felixge), [Tomek Łaziuk](https://github.com/tlaziuk), and [Kon Pik](https://github.com/konpikwastaken).
combined-stream/index.d.ts 000644 001751 000177 0000003201 14522265601 017510 0 ustar 00runner 000000 000000 14522265601 14522265601 ///
import { Stream } from "stream";
type Appendable = NodeJS.ReadableStream | NodeJS.WritableStream | Buffer | string | NextFunction;
type NextFunction = (next: (stream: Appendable) => any) => any;
interface Options {
maxDataSize?: number | undefined;
pauseStreams?: boolean | undefined;
}
declare class CombinedStream extends Stream implements Options {
readonly writable: boolean;
readonly readable: boolean;
readonly dataSize: number;
maxDataSize: number;
pauseStreams: boolean;
append(stream: Appendable): this;
write(data: any): void;
pause(): void;
resume(): void;
end(): void;
destroy(): void;
// private properties
_released: boolean;
// @TODO it should be a type of Array<'delayed-stream' instance | Buffer | string>
_streams: Array;
_currentStream: Stream | Buffer | string | null;
_getNext(): void;
_pipeNext(): void;
_handleErrors(stream: NodeJS.EventEmitter): void;
_reset(): void;
_checkDataSize(): void;
_updateDataSize(): void;
_emitError(error: Error): void;
// events
on(event: "close" | "end" | "resume" | "pause", cb: () => void): this;
on(event: "error", cb: (err: Error) => void): this;
on(event: "data", cb: (data: any) => void): this;
once(event: "close" | "end" | "resume" | "pause", cb: () => void): this;
once(event: "error", cb: (err: Error) => void): this;
once(event: "data", cb: (data: any) => void): this;
static create(options?: Options): CombinedStream;
static isStreamLike(stream: any): stream is Stream;
}
export = CombinedStream;
combined-stream/package.json 000644 001751 000177 0000002205 14522265601 020104 0 ustar 00runner 000000 000000 14522304647 14522265601 {
"name": "@types/combined-stream",
"version": "1.0.6",
"description": "TypeScript definitions for combined-stream",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/combined-stream",
"license": "MIT",
"contributors": [
{
"name": "Felix Geisendörfer",
"githubUsername": "felixge",
"url": "https://github.com/felixge"
},
{
"name": "Tomek Łaziuk",
"githubUsername": "tlaziuk",
"url": "https://github.com/tlaziuk"
},
{
"name": "Kon Pik",
"githubUsername": "konpikwastaken",
"url": "https://github.com/konpikwastaken"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/combined-stream"
},
"scripts": {},
"dependencies": {
"@types/node": "*"
},
"typesPublisherContentHash": "21d45b60817ad2e878b71c5f96a3fdf1707ce63fcbf6ed9b121af995ee2b60c2",
"typeScriptVersion": "4.5"
}