import { StaticPath, StaticPropsContext } from './scripts/build'; import { ComponentProps, JSX, ComponentType } from "preact"; declare type RestParam = S extends `...${infer A}` ? A : never; declare type StandardParam = S extends `...${infer A}` ? never : S; declare type ExtractParams = S extends `[${infer A}]` ? A : never; declare type TupleToUnion = T[number]; declare type Split = string extends S ? string[] : S extends '' ? [] : S extends `${infer T}/${infer U}` ? [T, ...Split] : [ S ]; declare type NormalizePath = S extends `/${infer T}` ? T : S; declare type AllPathParams>>>> = { [param in P]: string | string[]; }; declare type RestParams> = { [a in RestParam]: string[]; }; declare type StandardParams> = { [a in StandardParam]: string; }; export declare type PathParams = RestParams & StandardParams; export declare function definePage | keyof JSX.IntrinsicElements, Path extends string, P extends PathParams>(Component: T, page?: { path?: Path; getStaticPaths?: () => Promise<{ paths: StaticPath

[]; }>; getStaticProps?: (ctx: StaticPropsContext

) => Promise<{ props: ComponentProps; }>; }): { path?: Path; getStaticPaths?: () => Promise<{ paths: StaticPath

[]; }>; getStaticProps?: (ctx: StaticPropsContext

) => Promise<{ props: ComponentProps; }>; Component: T; }; export {};