Files
med-notes/.pnpm-store/v10/files/ad/790459626166a55553eb0190fa0ee6aa98efbdc12ddf0752e935d43c89ea91530b49c48ca412e92b16d433142b656fc80c927939fc9f0ef01ec64baa148171
2025-05-09 05:30:08 +02:00

51 lines
1.5 KiB
Plaintext

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<TRouter['routeTree']> | string = string,
TMaskFrom extends RoutePaths<TRouter['routeTree']> | string = TFrom,
TMaskTo extends string = '',
>(
opts: NavigateOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo>,
) => Promise<void> | void
export type BuildLocationFn = <
TRouter extends AnyRouter,
TTo extends string | undefined,
TFrom extends RoutePaths<TRouter['routeTree']> | string = string,
TMaskFrom extends RoutePaths<TRouter['routeTree']> | string = TFrom,
TMaskTo extends string = '',
>(
opts: ToOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo> & {
leaveParams?: boolean
_includeValidateSearch?: boolean
},
) => ParsedLocation