mirror of
https://github.com/honojs/hono.git
synced 2024-11-25 13:19:30 +01:00
13 lines
325 B
TypeScript
13 lines
325 B
TypeScript
export const METHOD_NAME_ALL = 'ALL' as const
|
|
export const METHOD_NAME_ALL_LOWERCASE = 'all' as const
|
|
|
|
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>
|
|
}
|