UNPKG

726 BTypeScriptView Raw
1/// <reference types="node" />
2import { ReadableOptions } from 'stream';
3import { ReadableTyped } from '../stream.model';
4/**
5 * Convenience function to create a Readable that can be pushed into (similar to RxJS Subject).
6 * Push `null` to it to complete (similar to RxJS `.complete()`).
7 *
8 * Difference from Readable.from() is that this readable is not "finished" yet and allows pushing more to it.
9 */
10export declare function readableCreate<T>(items?: Iterable<T>, opt?: ReadableOptions): ReadableTyped<T>;
11/**
12 * Convenience type-safe wrapper around Readable.from() that infers the Type of input.
13 */
14export declare function readableFrom<T>(items: Iterable<T> | AsyncIterable<T>, opt?: ReadableOptions): ReadableTyped<T>;