@types/labeled-stream-splicer
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

Installation

npm install --save @types/labeled-stream-splicer

Summary

This package contains type definitions for labeled-stream-splicer (https://github.com/browserify/labeled-stream-splicer).

Details

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

index.d.ts

/// <reference types="node" />
import * as stream from "stream";

type Stream = NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream;
type Index = number | string;
type LabeledStreamList = ReadonlyArray<string | Stream | readonly Stream[]>;

interface splicer extends Omit<stream.Duplex, "push" | "unshift"> {
    readonly length: number;
    splice(index: Index, howMany: number, ...stream: readonly Stream[]): Stream[];
    push(...stream: readonly Stream[]): number;
    pop(): Stream | undefined;
    unshift(...stream: readonly Stream[]): number;
    shift(): Stream | undefined;
    get(index: Index): Stream | undefined;
    indexOf(labelOrStream: string | Stream): number;
}

declare function splicer(streams?: LabeledStreamList, opts?: stream.TransformOptions): splicer;

declare namespace splicer {
    function obj(streams?: LabeledStreamList, opts?: stream.TransformOptions): splicer;
}

export = splicer;

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Junxiao Shi.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/labeled-stream-splicer

Weekly Downloads

346

Version

2.0.4

License

MIT

Unpacked Size

4.61 kB

Total Files

5

Last publish

Collaborators

  • types