/** * Stream Module - Common Consumers Factory * * Creates platform-neutral stream consumers given platform-specific converters. * Used by both Node.js and browser implementations. */ type StreamInput = AsyncIterable | ReadableStream; type BlobOptions = NonNullable[1]>; export interface StreamConsumers { arrayBuffer(stream: StreamInput): Promise; blob(stream: StreamInput, options?: BlobOptions): Promise; buffer(stream: StreamInput): Promise; json(stream: StreamInput): Promise; text(stream: StreamInput, encoding?: string): Promise; } export interface StreamConverters { streamToUint8Array(stream: StreamInput): Promise; streamToString(stream: StreamInput, encoding?: string): Promise; } /** * Create a `consumers` object bound to platform-specific stream converters. * * Both Node.js and browser implementations delegate to their own * `streamToUint8Array` / `streamToString`; everything else is identical. */ export declare function createConsumers(converters: StreamConverters): StreamConsumers; export {};