deno.land / x / deno@v1.28.2 / cli / bench / testdata / npm / hono / dist / router / reg-exp-router / router.d.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import type { Router, Result } from '../../router';interface Hint { components: string[]; regExpComponents: Array<true | string>; componentsLength: number; endWithWildcard: boolean; paramIndexList: number[]; maybeHandler: boolean; namedParams: [number, string, string][];}interface HandlerWithSortIndex<T> { handler: T; index: number;}interface Route<T> { method: string; path: string; hint: Hint; handlers: HandlerWithSortIndex<T>[]; middleware: HandlerWithSortIndex<T>[]; paramAliasMap: Record<string, string[]>;}export declare class RegExpRouter<T> implements Router<T> { routeData?: { index: number; routes: Route<T>[]; methods: Set<string>; }; add(method: string, path: string, handler: T): void; match(method: string, path: string): Result<T> | null; private buildAllMatchers; private buildMatcher;}export {};
deno

Version Info

Tagged at
2 years ago