@beignet/core
Version:
Core framework primitives for Beignet
15 lines • 629 B
TypeScript
import { parsePathTemplate } from "../contracts/index.js";
export type CompiledPath = {
keys: string[];
pattern: RegExp;
segments: ReturnType<typeof parsePathTemplate>["segments"];
normalizedPath: string;
shapeKey: string;
};
export declare class PathDecodeError extends Error {
constructor();
}
export declare function compilePath(path: string): CompiledPath;
export declare function decodeMatchedParams(keys: string[], match: RegExpExecArray): Record<string, string>;
export declare function compareRouteSpecificity(a: CompiledPath, b: CompiledPath): number;
//# sourceMappingURL=route-matching.d.ts.map