npm.io
1.0.0 • Published 1 year ago

@types/lazystream

Licence
MIT
Version
1.0.0
Deps
2
Size
6 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/lazystream

Summary

This package contains type definitions for lazystream (https://github.com/jpommerening/node-lazystream).

Details

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

index.d.ts

/// <reference types="node" />
import { Stream as NodeStream } from "node:stream";
import { PassThrough, Stream, TransformOptions } from "readable-stream";

export class Readable extends PassThrough {
    /**
     * @param fn The function to call to obtain the stream to read from
     */
    constructor(fn: () => NodeStream | Stream);
    /**
     * @param fn The function to call to obtain the stream to read from
     * @param options Options for the underlying {@link PassThrough} class.
     * Accessible via {@link fn}
     */
    constructor(fn: (options: TransformOptions) => NodeStream | Stream, options: TransformOptions);
    /**
     * @param fn The function to call to obtain the stream to read from
     * @param options Options for the underlying {@link PassThrough} class.
     * Accessible via {@link fn}, if they are passed
     */
    constructor(fn: (options?: TransformOptions) => NodeStream | Stream, options?: TransformOptions);
}

export class Writable extends PassThrough {
    /**
     * @param fn The function to call to obtain the stream to write to
     */
    constructor(fn: () => NodeStream | Stream);
    /**
     * @param fn The function to call to obtain the stream to write to
     * @param options Options for the underlying {@link PassThrough} class.
     * Accessible via {@link fn}
     */
    constructor(fn: (options: TransformOptions) => NodeStream | Stream, options: TransformOptions);
    /**
     * @param fn The function to call to obtain the stream to write to
     * @param options Options for the underlying {@link PassThrough} class.
     * Accessible via {@link fn}, if they are passed
     */
    constructor(fn: (options?: TransformOptions) => NodeStream | Stream, options?: TransformOptions);
}

Additional Details

Credits

These definitions were written by Adam Thompson-Sharpe.