Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/router-core/src/useNavigate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { RegisteredRouter } from './router'

export type UseNavigateResult<TDefaultFrom extends string> = <
TRouter extends RegisteredRouter,
TTo extends string | undefined,
TTo extends string | undefined = '.',
Copy link
Contributor Author

@leesb971204 leesb971204 Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason the code shown in the issue is inferred as never is because the to value is missing.

If navigateOptions.to is not set, it will navigate to current route from here.

TFrom extends string = TDefaultFrom,
TMaskFrom extends string = TFrom,
TMaskTo extends string = '',
Expand Down
Loading