1 | type Path = string | RegExp;
|
2 | type PathParams<KeyType extends keyof any = string> = {
|
3 | [ParamName in KeyType]?: string | ReadonlyArray<string>;
|
4 | };
|
5 | interface Match {
|
6 | matches: boolean;
|
7 | params?: PathParams;
|
8 | }
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | declare function coercePath(path: string): string;
|
14 |
|
15 |
|
16 |
|
17 | declare function matchRequestUrl(url: URL, path: Path, baseUrl?: string): Match;
|
18 | declare function isPath(value: unknown): value is Path;
|
19 |
|
20 | export { type Match, type Path, type PathParams, coercePath, isPath, matchRequestUrl };
|