/** * Route matcher — matches a URL path against a route pattern. * * Supports `:param` segments and `*` wildcards. * Used for route URL generation and testing (the runtime uses Hono's * built-in router for actual request dispatch). */ import type { RouteMatch } from '../types/http.types.js'; /** * Compiles a route pattern into a RegExp and a list of parameter names. * * @param pattern - Route pattern (e.g. '/posts/:id', '/files/*') * @returns Compiled regex and param names */ export declare function compilePattern(pattern: string): { regex: RegExp; paramNames: string[]; }; /** * Matches a URL path against a route pattern. * * @param pattern - Route pattern (e.g. '/posts/:id') * @param path - URL path to match (e.g. '/posts/abc-123') * @returns Match result with extracted parameters * * @example * matchRoute('/posts/:id', '/posts/abc-123') * // → { matched: true, params: { id: 'abc-123' } } * * matchRoute('/posts/:id', '/users/1') * // → { matched: false, params: {} } */ export declare function matchRoute(pattern: string, path: string): RouteMatch; //# sourceMappingURL=matcher.d.ts.map