interface RouteMatch {
params: Record<string, string>;
parsedParams?: Record<string, unknown>;
route: CompiledRoute;
matched: MatchedRoute[];
searchParams: URLSearchParams;
search: Record<string, unknown>;
}
interface NavigateOptions {
replace?: boolean;
params?: Record<string, string>;
search?: string | URLSearchParams | Record<string, string | number | boolean>;
}
type NavigateInput<TPath extends string> = {
to: TPath;
} & NavigateOptions;
type RoutePattern<T extends Record<string, RouteConfigLike>> = keyof T & string;
type RoutePaths<T extends Record<string, RouteConfigLike>> = /* concrete URL union */;
type ExtractParams<TPath extends string> = /* extracted param object */;
type ExtractSearchParams<TPath extends string, TMap = RouteDefinitionMap> =
/* search param schema output, or Record<string, string> */;
type InferRouteMap<T> = T extends TypedRoutes<infer R> ? R : T;
type TypedRoutes<T> = CompiledRoute[] & { readonly __routes: T };
interface ReactiveSearchParams<T = Record<string, unknown>> {
navigate(partial: Partial<T>, options?: { push?: boolean }): void;
[key: string]: unknown;
}