x/oak/router.ts

A middleware framework for handling HTTP with Deno, Node, Bun and Cloudflare Workers 🐿️ 🦕
Very Popular
Latest
interface RouterMiddleware
import { type RouterMiddleware } from "https://dotland-vbqsvsrpfncg.deno-staging.dev/x/oak@v17.1.3/router.ts?p=prototype.%5BSymbol.for%28%22nodejs.util.inspect.custom%22%29%5D&s=RouterMiddleware";

The interface that Router middleware should adhere to.

Type Parameters

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

Call Signatures

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

Properties

optional
param: keyof P
[src]

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

optional
router: Router<any>
[src]