import { Result } from '../../../util/common/result'; import { RequestId } from '../../networking/common/fetch'; import { IHeaders, Response } from '../../networking/common/fetcherService'; import { Completion } from './completionsAPI'; export declare class ResponseStream { private readonly fetcherResponse; readonly requestId: RequestId; readonly headers: IHeaders; /** * A promise that resolves to the array of completions that were emitted by the stream. * * (it's expected to not throw) */ readonly aggregatedStream: Promise>; /** * A completion that aggregates completions stream. * * (it's expected to not throw) */ readonly response: Promise>; /** * The stream of completions that were emitted by the response. * * @remarks This stream is single-use — it can only be iterated once. * * @throws {Error} if the response stream throws an error. */ readonly stream: AsyncIterable; constructor(fetcherResponse: Response, stream: AsyncIterable, requestId: RequestId, headers: IHeaders); /** * @throws client of the method should handle the error */ destroy(): Promise; private static aggregateCompletionsStream; } //# sourceMappingURL=responseStream.d.ts.map