跳转到内容
简体中文

Route

此内容尚不支持你的语言。

Route = { handler: (req) => Promise<HttpResponse> | HttpResponse; kind: "terminal"; method: HttpMethod; } | { child: Route; kind: "path"; segment: string; } | { kind: "concat"; routes: ReadonlyArray<Route>; } | { child: Route; kind: "middleware"; middleware: Middleware; }

Defined in: src/http/Route.ts:39

Node type emitted by DSL builders like path(...), get(...). Internal representation is a tree that knows how to flatten into CompiledRoutes.