/// import type { Byte } from '@principia/base/Byte'; import type { FIO, IO, UIO } from '@principia/base/IO'; import type { ReadonlyRecord } from '@principia/base/Record'; import type * as http from 'http'; import type { Readable } from 'stream'; import * as Ma from '@principia/base/Managed'; import * as M from '@principia/base/Maybe'; import * as NT from '@principia/base/Newtype'; import * as SRef from '@principia/base/SRef'; import * as S from '@principia/base/Stream'; import { HttpException } from './HttpException'; import * as Status from './StatusCode'; interface CloseEvent { readonly _tag: 'Close'; } interface ErrorEvent { readonly _tag: 'Error'; readonly error: Error; } interface DrainEvent { readonly _tag: 'Drain'; } interface FinishEvent { readonly _tag: 'Finish'; } interface PipeEvent { readonly _tag: 'Pipe'; readonly src: Readable; } interface UnpipeEvent { readonly _tag: 'Unpipe'; readonly src: Readable; } export declare type ResponseEvent = CloseEvent | DrainEvent | ErrorEvent | FinishEvent | PipeEvent | UnpipeEvent; export interface HttpResponseCompleted extends NT.Newtype<'HttpResponseCompleted', void> { } export declare const HttpResponseCompleted: NT.NewtypeIso; export declare class HttpResponse { readonly ref: SRef.USRef; eventStream: Ma.Managed>; constructor(ref: SRef.USRef); access(f: (res: http.ServerResponse) => IO): IO; modify(f: (res: http.ServerResponse) => IO): IO; status(s: Status.StatusCode): UIO; get headers(): UIO; get(name: string): UIO>; set(headers: ReadonlyRecord): FIO; has(name: string): UIO; write(chunk: string | Buffer): FIO; pipeFrom(stream: S.Stream): IO; end(): UIO; } export {}; //# sourceMappingURL=HttpResponse.d.ts.map