Module

x/oak/router.ts>RouteParams

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

A dynamic type which attempts to determine the route params based on matching the route string.

Type Parameters

Route extends string
definition: string extends Route ? ParamsDictionary : Route extends `${string}(${string}` ? ParamsDictionary : Route extends `${string}:${infer Rest}` ? (GetRouteParams<Rest> extends never ? ParamsDictionary : GetRouteParams<Rest> extends `${infer ParamName}?` ? [P in ParamName]?: string : [P in GetRouteParams<Rest>]: string) & (Rest extends `${GetRouteParams<Rest>}${infer Next}` ? RouteParams<Next> : unknown) : Record<string | number, string | undefined>