import type { OutgoingHttpHeaders, ServerResponse } from 'node:http'; import type { SerializeOptions } from '@tinyhttp/cookie'; import type { DownloadOptions, FormatProps, SendFileOptions } from '@tinyhttp/res'; import type { App } from './app.js'; import type { Request } from './request.js'; import type { AppRenderOptions, TemplateEngineOptions } from './types.js'; export declare const renderTemplate: (_req: Request, res: Response, app: App) => (file: string, data?: Record, options?: AppRenderOptions) => Response; export interface Response extends ServerResponse { header(field: string | Record, val?: string | any[]): Response; set(field: string | Record, val?: string | any[]): Response; get(field: HeaderName): OutgoingHttpHeaders[HeaderName]; send(body: B): Response; sendFile(path: string, options?: SendFileOptions, cb?: (err?: unknown) => void): Response; json(body: B): Response; status(status: number): Response; sendStatus(statusCode: number): Response; cookie(name: string, value: string | Record, options?: SerializeOptions & Partial<{ signed: boolean; }>): Response; clearCookie(name: string, options?: SerializeOptions): Response; location(url: string): Response; links(links: { [key: string]: string; }): Response; render(file: string, data?: Record, options?: AppRenderOptions): Response; vary(field: string): Response; format(obj: FormatProps): Response; redirect(url: string, status?: number): Response; type(type: string): Response; download(path: string, filename: string, options?: DownloadOptions, cb?: (err?: unknown) => void): Response; attachment(filename?: string): Response; app?: App; locals: Record; /** * Send JSON response with JSONP callback support. * * To enable this method, install the `@tinyhttp/jsonp` package and attach the method to `res.jsonp` property. * * @param obj Response object */ jsonp(obj: any): Response; append(field: string, value: any): Response; } //# sourceMappingURL=response.d.ts.map