x/oak/router.ts

A middleware framework for handling HTTP with Deno, Node, Bun and Cloudflare Workers 🐿️ 🦕
Very Popular
Go to Latest
interface RouterContext
implements Context<S>
import { type RouterContext } from "https://dotland-vbqsvsrpfncg.deno-staging.dev/x/oak@v17.1.2/router.ts?p=prototype.values&s=RouterContext";

The context passed router middleware.

Type Parameters

R extends string[src]
optional
P extends RouteParams<R> = RouteParams<R>
[src]
optional
S extends State = Record<string, any>
[src]

Properties

captures: string[][src]

When matching the route, an array of the capturing groups from the regular expression.

optional
matched: Layer<R, P, S>[]
[src]

The routes that were matched for this request.

params: P[src]

Any parameters parsed from the route when matched.

router: Router[src]

A reference to the router instance.

optional
routeName: string
[src]

If the matched route has a name, the matched route name is provided here.

optional
routerPath: string
[src]

Overrides the matched path for future route middleware, when a routerPath option is not defined on the Router options.