/** * Converts a ReadableStream to an AsyncIterableIterator. * * This function preferentially uses the native async iteration support * and falls back to manual reader-based iteration for environments that * don't support it (primarily Safari as of 2025). * * @template T - The type of values in the stream * @param stream - The ReadableStream to convert * @returns An AsyncIterableIterator that yields values from the stream * * @example * ```ts * const stream = new ReadableStream({ * start(controller) { * controller.enqueue('chunk1'); * controller.enqueue('chunk2'); * controller.close(); * } * }); * * for await (const chunk of convertStreamToAsyncIterableIterator(stream)) { * console.log(chunk); * } * ``` */ export declare function convertStreamToAsyncIterableIterator(stream: ReadableStream): AsyncIterableIterator;