import type { ApiRoute, PageRoute } from "../router/route-scanner.js"; export interface MatchResult { route: PageRoute; params: Record; searchParams: URLSearchParams; } /** * Match a request pathname against a list of page routes. * * Routes are sorted by specificity (static > dynamic > catch-all) before * matching, so `/about` wins over `/:slug` even if the catch-all appears first. * * URL segments are safely decoded (plan §11.1, runtime-security §10). */ export declare function matchRoute(pathname: string, routes: PageRoute[]): MatchResult | undefined; export interface ApiMatchResult { route: T; params: Record; } /** * Match a request pathname against a list of API routes. */ export declare function matchApiRoute(pathname: string, routes: T[]): ApiMatchResult | undefined;