@naturalcycles/nodejs-lib
Version:
Standard library for Node.js
10 lines (9 loc) • 493 B
TypeScript
/// <reference types="node" />
import { Readable } from 'stream';
import { WritableTyped } from '../stream.model';
/**
* Allows to stop the Readable stream after the pipeline has processed X number of rows.
* It counts OUTPUT rows (not input), because this Writable is always at the end of the Pipeline.
* It ensures that everything has been processed before issuing a STOP on the readable.
*/
export declare function writableLimit<T>(readable: Readable, limit: number): WritableTyped<T>;