generate-next-route-constants
Version:
Generate route constants for Next.js App Directory
6 lines • 616 B
TypeScript
import { type PathVariable } from 'ts-path-params';
declare const NEXT_DYNAMIC_ROUTE_PATTERN: readonly ["[", "]"];
export declare const generatePath: <const Path extends string>(path: Path, variable: keyof import("ts-path-params/dist/types").PathVariable<Path, readonly ["[", "]"]> extends never ? never : { [key in keyof import("ts-path-params/dist/types").PathVariable<Path, readonly ["[", "]"]>]: import("ts-path-params/dist/types").PathVariableValue; }) => string;
export type PathParams<Path extends string> = PathVariable<Path, typeof NEXT_DYNAMIC_ROUTE_PATTERN>;
export {};
//# sourceMappingURL=utils.d.ts.map