/// export interface IHeaders { [name: string]: string; } export interface IHeaderNames { [name: string]: string; } export interface IResponseProps { content: Buffer; headers: IHeaders; statusCode: number; } export interface IResponse extends IResponseProps { content: Buffer; statusCode: number; contentType: (type?: string) => string; contentLength: () => number; getHeader: (name: string) => string; getHeaders: () => IHeaders; header: (name: string, value: string) => void; is: (...types: string[]) => boolean; isCss: () => boolean; isJavaScript: () => boolean; isHtml: () => boolean; json: () => IResponseProps; charset: () => string; removeHeader: (name: string) => void; removeHeaders: () => void; setHeader: (name: string, value: string) => void; status: () => number; text: string; type: (type: string) => void; } declare class Response implements IResponse { statusCode: number; private _content; private _headerNames; private _headers; constructor({content, headers, statusCode}: IResponseProps); contentType(type?: string): string; contentLength(): number; getHeader(name: string): string; getHeaders(): IHeaders; header(field: string, value: string): void; is(...types: string[]): boolean; isCss(): boolean; isJavaScript(): boolean; isHtml(): boolean; charset(): string; content: Buffer; json(): IResponseProps; removeHeader(name: string): void; removeHeaders(): void; setHeader(name: string, value: string): void; status(): number; text: string; type(type: string): void; headers: IHeaders; } export default Response;