import { StreamController, StreamOptions } from './types'; /** * Create a stream controller for handling streaming responses * * @typeParam T - Type of streamed data items * @param response - Response with readable body stream * @param options - Stream handling options * @returns Stream controller for subscribing to events * * @example * ```typescript * // NDJSON streaming * const stream = streamResponse(response, { ndjson: true }); * * const unsubscribe = stream.subscribe((event) => { * if (event.type === 'data') { * console.log('Received:', event.data); * } * }); * * // Later: cleanup * unsubscribe(); * stream.abort(); * ``` */ export declare function streamResponse(response: Response | { body: ReadableStream | null; }, options?: StreamOptions): StreamController;