Перейти к содержимому
Русский

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.