import type { Request } from './request.js'; import type { Response } from './response.js'; export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS'; export type Next = () => Promise; export interface Middleware { handle(ctx: Context, next: Next): Promise; } export type MiddlewareClass = new () => Middleware; export type MiddlewareInput = Middleware | MiddlewareClass; export type ControllerAction = [new (...args: unknown[]) => object, string]; export type RouteHandler = ControllerAction | ((ctx: Context) => Promise | void); export interface RouteDefinition { method: HttpMethod; path: string; handler: RouteHandler; middleware: MiddlewareInput[]; name?: string; } export interface GroupOptions { prefix?: string; middleware?: MiddlewareInput[]; } export interface Context { request: Request; response: Response; params: Record; state: Record; } export interface ServerOptions { port?: number; host?: string; } export interface CookieOptions { maxAge?: number; expires?: Date; path?: string; domain?: string; secure?: boolean; httpOnly?: boolean; sameSite?: 'strict' | 'lax' | 'none'; } //# sourceMappingURL=types.d.ts.map