UNPKG

834 BTypeScriptView Raw
1declare const pathToSegments: (path: string) => {
2 text: string;
3 isDynamic: boolean;
4 isCatchAll: boolean;
5}[];
6export interface Params {
7 [param: string]: string | string[];
8}
9export interface RouteInfo {
10 segments: ReturnType<typeof pathToSegments>;
11 params: Params;
12}
13export declare type StaticPath<P extends Params = Params> = string | {
14 params: P;
15 meta?: any;
16};
17export interface StaticPropsContext<P extends Params = Params> {
18 path: string;
19 params: P;
20}
21export interface StaticPathsContext {
22}
23export declare const normalizePathName: (str: string) => string;
24export declare function getPathFromParams(fileName: string, params: Params): string;
25export declare function generateStaticPropsContext(fileName: string, pathOrParams: string | {
26 params: Params;
27}): StaticPropsContext;
28export {};