Module

x/oak/router.ts>RouterMiddleware

A middleware framework for handling HTTP with Deno, Node, Bun and Cloudflare Workers 🐿️ 🦕
Very Popular
Latest
interface RouterMiddleware
import { type RouterMiddleware } from "https://dotland.deno.dev/x/oak@v17.1.2/router.ts";

The interface that Router middleware should adhere to.

Type Parameters

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

Call Signatures

(context: RouterContext<R, P, S>, next: () => Promise<unknown>): Promise<unknown> | unknown

Properties

optional
param: keyof P

For route parameter middleware, the param key for this parameter will be set.

optional
router: Router<any>