import type { CompileOptions, MatchOptions, ParseOptions } from 'path-to-regexp'; import type { PathArgs } from './pathTypes.js'; export type { PathArgs } from './pathTypes.js'; export interface DefaultRoutePojo { } export type AnyIfEmpty = keyof T extends never ? any : T; export type NamedPath = { path: string; } & ParseOptions & MatchOptions & CompileOptions; export type NamedPaths = Record; type PathOf = Name extends keyof Paths ? Paths[Name] extends { path: infer P extends string; } ? P : Paths[Name] & string : Name; /** Params `buildPath()` takes for a route name (or a raw path) */ export type RouteParams = string extends PathOf ? any : PathArgs>; /** `buildPath()` params: required when the path has required params */ export type BuildPathArgs = {} extends RouteParams ? [pathData?: RouteParams] : [pathData: RouteParams]; //# sourceMappingURL=types.d.ts.map