Skip to content

Commit 7eba99e

Browse files
fix: router.buildLocation use RegisteredRouter (#4242)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent bd9eb8b commit 7eba99e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/router-core/src/RouterProvider.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import type { NavigateOptions, ToOptions } from './link'
22
import type { ParsedLocation } from './location'
33
import type { RoutePaths } from './routeInfo'
4-
import type {
5-
AnyRouter,
6-
RegisteredRouter,
7-
ViewTransitionOptions,
8-
} from './router'
4+
import type { RegisteredRouter, ViewTransitionOptions } from './router'
95

106
export interface MatchLocation {
117
to?: string | number | null
@@ -37,7 +33,7 @@ export type NavigateFn = <
3733
) => Promise<void> | void
3834

3935
export type BuildLocationFn = <
40-
TRouter extends AnyRouter,
36+
TRouter extends RegisteredRouter,
4137
TTo extends string | undefined,
4238
TFrom extends RoutePaths<TRouter['routeTree']> | string = string,
4339
TMaskFrom extends RoutePaths<TRouter['routeTree']> | string = TFrom,

0 commit comments

Comments
 (0)