Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hex/src/fw/service/deps.ts>oak.RouterContext

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Go to Latest
interface oak.RouterContext
implements Context<S>
import { type oak } from "https://deno.land/x/hex@0.6.3/src/fw/service/deps.ts";
const { RouterContext } = oak;

The context passed router middleware.

Type Parameters

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

Properties

captures: string[]

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

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

The routes that were matched for this request.

params: P

Any parameters parsed from the route when matched.

router: Router

A reference to the router instance.

optional
routeName: string

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

optional
routerPath: string

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