export interface AnyRouteObject { path?: string | undefined; element?: React.ReactNode; } export type AnyUseRoute = (routes: AnyRouteObject[], location?: Location) => React.ReactElement | null; export interface AnyRouteMatch { route: AnyRouteObject; params: Record; } export type AnyLocation = { pathname?: string; } | string; export type AnyCreateRouter = (routes: AnyRouteObject[], options?: Options) => { state: { location: { pathname: string; }; matches: AnyRouteMatch[]; }; subscribe: (callback: (routerState: { location: { pathname: string; }; matches: AnyRouteMatch[]; }) => void) => void; };