import { Layer } from "https://deno.land/x/oak@v17.1.3/router.ts";
An internal class used to group together middleware when using multiple middlewares with a router.
Constructors
new
Layer(path: string,
methods: HTTPMethods[],
middleware: RouterMiddleware<R, P, S> | RouterMiddleware<R, P, S>[],
unnamed 3?: LayerOptions,
Type Parameters
optional
P extends RouteParams<R> = RouteParams<R>optional
S extends State = Record<string, any>Methods
captures(path: string): string[]
match(path: string): boolean
param(param: string, fn: RouterParamMiddleware<any, any, any>): this
params(captures: string[], existingParams?: RouteParams<R>): RouteParams<R>
setPrefix(prefix: string): this
url(params?: RouteParams<R>, options?: UrlOptions): string
[Symbol.for("Deno.customInspect")](inspect: (value: unknown) => string): string
[Symbol.for("nodejs.util.inspect.custom")](): any
depth: number,
options: any,
inspect: (value: unknown, options?: unknown) => string,