2.1.0 • Published 12 days ago

@types/stream-chain v2.1.0

Weekly downloads
8,471
License
MIT
Repository
github
Last release
12 days ago

Installation

npm install --save @types/stream-chain

Summary

This package contains type definitions for stream-chain (https://github.com/uhop/stream-chain#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stream-chain.

index.d.ts

// Type definitions for stream-chain 2.0
// Project: https://github.com/uhop/stream-chain#readme
// Definitions by: Eugene Lazutkin <https://github.com/uhop>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />
import { Readable, Writable, Duplex, Transform, DuplexOptions } from 'stream';

export = Chain;

type TransformFunction = (chunk: any, encoding?: string) => any;

type Stream = Readable | Writable | Duplex | Transform;
type StreamItem = Stream | TransformFunction;

declare class Chain extends Duplex {
    constructor(fns: StreamItem[], options?: Chain.ChainOptions);

    input: Stream;
    output: Stream;
    streams: Stream[];
}

declare namespace Chain {
    interface ChainOptions extends DuplexOptions {
        skipEvents?: boolean | undefined;
    }

    function chain(fns: StreamItem[], options?: ChainOptions): Chain;
}

Additional Details

  • Last updated: Fri, 02 Jul 2021 22:32:58 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Eugene Lazutkin.