export type EventCallback = (data?: any) => void; export interface StreamWrapper { setEncoding(encoding?: string): void; on(event: string, callback: EventCallback): void; off(event: string, callback: EventCallback): void; pipe(dest: WritableStream): WritableStream; pipeTo(dest: WritableStream): WritableStream; unpipe(dest?: WritableStream): void; destroy(error?: Error): void; pause(): void; resume(): void; get isPaused(): boolean; read(): Promise; text(): Promise; json(): Promise; [Symbol.asyncIterator](): AsyncIterableIterator; } export declare function chooseStreamWrapper(responseBody: any): Promise>>;