@types/from2
TypeScript definitions for from2
Last updated 9 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/from2 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/from2

Summary

This package contains type definitions for from2 (https://github.com/hughsk/from2).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/from2.

index.d.ts

// Type definitions for from2 2.3
// Project: https://github.com/hughsk/from2
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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

export = from2;

declare function from2(read: from2.ReadInput): NodeJS.ReadableStream;
declare function from2(opts: from2.ObjectModeOptions, read: from2.ReadObjectInput): NodeJS.ReadableStream;
declare function from2(opts: from2.Options, read: from2.ReadInput): NodeJS.ReadableStream;

declare namespace from2 {
    function obj(read: ReadObjectInput): NodeJS.ReadableStream;
    function obj(opts: { objectMode?: true | undefined } & stream.ReadableOptions, read: ReadObjectInput): NodeJS.ReadableStream;

    function ctor(opts?: Options): From2Ctor<ReadInput>;
    function ctor(opts: ObjectModeOptions): From2Ctor<ReadObjectInput>;

    type ObjectModeOptions = { objectMode: true } & stream.ReadableOptions;
    type Options = { objectMode?: false | undefined } & stream.ReadableOptions;

    type From2Ctor<R extends ReadInput | ReadObjectInput> = new(read: R) => NodeJS.ReadableStream;

    type ReadObjectInput = ReadCallback<NextObjectCallback> | any[];
    type ReadInput = ReadCallback<NextCallback> | Chunk[];
    type ReadCallback<N extends NextCallback | NextObjectCallback> = (size: number, next: N) => void;
    type NextCallback = (err: any | undefined, chunk: Chunk) => void;
    type NextObjectCallback = (err: any | undefined, chunk: any) => void;
    type Chunk = string | Buffer | Uint8Array | null;
}

Additional Details

  • Last updated: Tue, 06 Jul 2021 20:33:01 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by BendingBender.

Current Tags

  • 2.3.1                                ...           latest (5 years ago)
  • 2.3.0                                ...           ts2.0 (9 years ago)
  • 2.3.0                                ...           ts2.1 (9 years ago)
  • 2.3.0                                ...           ts2.2 (9 years ago)
  • 2.3.0                                ...           ts2.3 (9 years ago)
  • 2.3.0                                ...           ts2.4 (9 years ago)
  • 2.3.0                                ...           ts2.5 (9 years ago)
  • 2.3.0                                ...           ts2.6 (9 years ago)
  • 2.3.0                                ...           ts2.7 (9 years ago)
  • 2.3.0                                ...           ts2.8 (9 years ago)
  • 2.3.0                                ...           ts2.9 (9 years ago)
  • 2.3.0                                ...           ts3.0 (9 years ago)
  • 2.3.0                                ...           ts3.1 (9 years ago)
  • 2.3.0                                ...           ts3.2 (9 years ago)
  • 2.3.0                                ...           ts3.3 (9 years ago)
  • 2.3.0                                ...           ts3.4 (9 years ago)
  • 2.3.0                                ...           ts3.5 (9 years ago)
  • 2.3.1                                ...           ts3.6 (5 years ago)
  • 2.3.1                                ...           ts3.7 (5 years ago)
  • 2.3.1                                ...           ts3.8 (5 years ago)
  • 2.3.1                                ...           ts3.9 (5 years ago)
  • 2.3.1                                ...           ts4.0 (5 years ago)
  • 2.3.1                                ...           ts4.1 (5 years ago)
  • 2.3.1                                ...           ts4.2 (5 years ago)
  • 2.3.1                                ...           ts4.3 (5 years ago)
  • 2.3.1                                ...           ts4.4 (5 years ago)
  • 2.3.1                                ...           ts4.5 (5 years ago)
  • 2.3.1                                ...           ts4.6 (5 years ago)
  • 2.3.1                                ...           ts4.7 (5 years ago)
  • 2.3.1                                ...           ts4.8 (5 years ago)
  • 2.3.1                                ...           ts4.9 (5 years ago)

2 Versions

  • 2.3.1                                ...           5 years ago
  • 2.3.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |