blob: 753bbbc687d10430fd61c1849870136df84ba867 (
plain)
1
2
3
4
5
6
7
8
9
10
|
export declare const METHOD_NAME_ALL: "ALL";
export declare const METHOD_NAME_ALL_LOWERCASE: "all";
export interface Router<T> {
add(method: string, path: string, handler: T): void;
match(method: string, path: string): Result<T> | null;
}
export interface Result<T> {
handlers: T[];
params: Record<string, string>;
}
|