UNPKG

498 BTypeScriptView Raw
1/// <reference types="node" />
2import { Readable } from 'node:stream';
3import { WritableTyped } from '../stream.model';
4/**
5 * Allows to stop the Readable stream after the pipeline has processed X number of rows.
6 * It counts OUTPUT rows (not input), because this Writable is always at the end of the Pipeline.
7 * It ensures that everything has been processed before issuing a STOP on the readable.
8 */
9export declare function writableLimit<T>(readable: Readable, limit: number): WritableTyped<T>;