Neah/node_modules/next/dist/shared/lib/router/utils/route-matcher.d.ts
2025-04-24 17:19:14 +02:00

12 lines
384 B
TypeScript

import type { Group } from './route-regex';
import type { Params } from '../../../../server/request/params';
export interface RouteMatchFn {
(pathname: string): false | Params;
}
type RouteMatcherOptions = {
re: Pick<RegExp, 'exec'>;
groups: Record<string, Group>;
};
export declare function getRouteMatcher({ re, groups, }: RouteMatcherOptions): RouteMatchFn;
export {};