export const METHOD_NAME_ALL = 'ALL' as constexport const METHOD_NAME_ALL_LOWERCASE = 'all' as constexport const METHODS = ['get', 'post', 'put', 'delete', 'options', 'patch'] as constexport const MESSAGE_MATCHER_IS_ALREADY_BUILT = 'Can not add a route since the matcher is already built.'
export interface Router<T> { name: string add(method: string, path: string, handler: T): void match(method: string, path: string): Result<T>}
export type ParamIndexMap = Record<string, number>export type ParamStash = string[]export type Params = Record<string, string>export type Result<T> = [[T, ParamIndexMap][], ParamStash] | [[T, Params][]]
export class UnsupportedPathError extends Error {}