import { SimpleReadableStream } from "./types/simple-readable-stream"; /** * TextStreamSearch searches ReadableStreams for text and regexes. */ export declare class TextStreamSearch { /** the output captured so far */ private streamText; /** * Subscriptions contains all the requests from users of this library * to be notified when a particular text or regex shows up in the text stream. */ private searchList; constructor(stream: SimpleReadableStream); /** Fulltext returns the complete content captured from this stream so far. */ fullText(): string; /** * WaitForText returns a promise that resolves with the matching text * when the given text shows up in the observed stream. * If a timeout is given, aborts after the given duration. */ waitForText(text: string, timeout?: number): Promise; /** * WaitForRegex returns a promise that resolves with the matching text * when the given RegExp shows up in observed stream. * If a timeout is given, aborts after the given duration. */ waitForRegex(regex: RegExp, timeout?: number): Promise; /** OnStreamData is called when new text arrives on the input stream. */ private onStreamData; }