import type { NavigateOptions, ToOptions } from './link' import type { ParsedLocation } from './location' import type { RoutePaths } from './routeInfo' import type { AnyRouter, RegisteredRouter, ViewTransitionOptions, } from './router' export interface MatchLocation { to?: string | number | null fuzzy?: boolean caseSensitive?: boolean from?: string } export interface CommitLocationOptions { replace?: boolean resetScroll?: boolean hashScrollIntoView?: boolean | ScrollIntoViewOptions viewTransition?: boolean | ViewTransitionOptions /** * @deprecated All navigations use React transitions under the hood now **/ startTransition?: boolean ignoreBlocker?: boolean } export type NavigateFn = < TRouter extends RegisteredRouter, TTo extends string | undefined, TFrom extends RoutePaths | string = string, TMaskFrom extends RoutePaths | string = TFrom, TMaskTo extends string = '', >( opts: NavigateOptions, ) => Promise | void export type BuildLocationFn = < TRouter extends AnyRouter, TTo extends string | undefined, TFrom extends RoutePaths | string = string, TMaskFrom extends RoutePaths | string = TFrom, TMaskTo extends string = '', >( opts: ToOptions & { leaveParams?: boolean _includeValidateSearch?: boolean }, ) => ParsedLocation