import type { StaticPath, StaticPropsContext } from './utils/router'; 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 interface GetStaticPaths> { (ctx: {}): Promise<{ paths: StaticPath

[]; } | string | null>; } export interface GetStaticProps | keyof JSX.IntrinsicElements, Path extends string, P extends PathParams> { (ctx: StaticPropsContext

): Promise<{ props: ComponentProps; } | string | null>; } export interface Page | keyof JSX.IntrinsicElements, Path extends string, P extends PathParams> { path?: Path; getStaticPaths?: GetStaticPaths; getStaticProps?: GetStaticProps; } export declare function definePage | keyof JSX.IntrinsicElements, Path extends string, P extends PathParams>(Component: T, page?: Page): { path?: Path; getStaticPaths?: GetStaticPaths; getStaticProps?: GetStaticProps; Component: T; }; export {};