Skip to main content
This release is 6 versions behind 17.1.3 — the latest version of @oak/oak. Jump to latest

@oak/oak@16.0.0
Built and signed on GitHub Actions

A middleware framework for handling HTTP with Deno, Node.js, Bun and Cloudflare Workers 🐿️🦕🥟⚙️

This package works with Cloudflare Workers, Node.js, Deno, Bun
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
7 months ago (16.0.0)
interface RouterContext
extends Context<S>

The context passed router middleware.

Type Parameters

R extends string
S extends State = Record<string, any>

Properties

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.

Any parameters parsed from the route when matched.

A reference to the router instance.

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

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

Add Package

deno add jsr:@oak/oak

Import symbol

import { type RouterContext } from "@oak/oak/router";

---- OR ----

Import directly with a jsr specifier

import { type RouterContext } from "jsr:@oak/oak/router";

Add Package

npx jsr add @oak/oak

Import symbol

import { type RouterContext } from "@oak/oak/router";

Add Package

yarn dlx jsr add @oak/oak

Import symbol

import { type RouterContext } from "@oak/oak/router";

Add Package

pnpm dlx jsr add @oak/oak

Import symbol

import { type RouterContext } from "@oak/oak/router";

Add Package

bunx jsr add @oak/oak

Import symbol

import { type RouterContext } from "@oak/oak/router";