UNPKG

671 BTypeScriptView Raw
1/// <reference types="node" />
2import { Writable } from 'node:stream';
3import { DeferredPromise } from '@naturalcycles/js-lib';
4import { TransformOptions } from '../stream.model';
5export interface WritableVoidOptions extends TransformOptions {
6 /**
7 * If set - it will be Resolved when the Stream is done (after final.cb)
8 */
9 streamDone?: DeferredPromise;
10}
11/**
12 * Use as a "null-terminator" of stream.pipeline.
13 * It consumes the stream as quickly as possible without doing anything.
14 * Put it in the end of your pipeline in case it ends with Transform that needs a consumer.
15 */
16export declare function writableVoid(opt?: WritableVoidOptions): Writable;