x/oak/router.ts

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

The internal abstraction of a route used by the oak Router.

Type Parameters

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

Properties

methods: HTTPMethods[][src]

The HTTP methods that this route handles.

middleware: RouterMiddleware<R, P, S>[][src]

The middleware that will be applied to this route.

optional
name: string
[src]

An optional name for the route.

options: LayerOptions[src]

Options that were used to create the route.

paramNames: (keyof P)[][src]

The parameters that are identified in the route that will be parsed out on matched requests.

path: string[src]

The path that this route manages.

regexp: RegExp[src]

The regular expression used for matching and parsing parameters for the route.