import type { NexusStream, StreamChunk } from '../types/response.js'; /** Reads a stream to the end and returns its text. */ export declare function collectStream(stream: NexusStream): Promise; /** Transforms each chunk of a stream. */ export declare function mapStream(stream: NexusStream, mapChunk: (chunk: StreamChunk) => StreamChunk | Promise): AsyncGenerator; /** A stream that yields one text chunk and finishes, for tests and cached answers. */ export declare function createTextStream(text: string): NexusStream;