You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The string type should not be accepted by to's type
Screenshots or Videos
No response
Platform
OS: Windows
Browser: Chrome
Version: 130.0.6723.59
Additional context
I don't know if this is intentional, but it's making migrating away from another router more difficult as we can't automatically trust links/navigations.
The text was updated successfully, but these errors were encountered:
My workaround for now seems to be to narrow the type manually by using as const satisfies LinkProps["to"];, but this was also an issue for me, especially in shared components.
Which project does this relate to?
Router
Describe the bug
As the title says,
to
accepts thestring
type, meaning that these examples will be "valid":Your Example Website or App
https://stackblitz.com/edit/github-vg75qp?file=src%2Fmain.tsx
Steps to Reproduce the Bug or Issue
string
toto
Expected behavior
The
string
type should not be accepted byto
's typeScreenshots or Videos
No response
Platform
Additional context
I don't know if this is intentional, but it's making migrating away from another router more difficult as we can't automatically trust links/navigations.
The text was updated successfully, but these errors were encountered: