UNPKG

@gameye/sdk

Version:
10 lines (9 loc) 339 B
/// <reference types="node" /> import { Readable } from "stream"; /** * Read stream until the waitFor function returns true, then * pause the stream. * @param stream stream to read * @param waitFor return true to resolve */ export declare function streamWait<T = any>(stream: Readable, waitFor?: ((chunk: T) => boolean)): Promise<T>;