Skip to main content
Module

x/hono/router.ts

Ultrafast web framework for the Edge
Extremely Popular
Go to Latest
File
export const METHOD_NAME_ALL = 'ALL' as constexport const METHOD_NAME_ALL_LOWERCASE = 'all' as constexport const METHODS = ['get', 'post', 'put', 'delete', 'head', 'options', 'patch'] 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>}
export class UnsupportedPathError extends Error {}