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
router.routesByPath is defined as RoutesByPath<TRouteTree> which includes trailing '/' for index routes. However this does not match the runtime type which removes trailing slashes.
Which project does this relate to?
Router
Describe the bug
Problem
router.routesByPath
is defined asRoutesByPath<TRouteTree>
which includes trailing '/' for index routes. However this does not match the runtime type which removes trailing slashes.Description
Given the following structure:
generates:
but in:
https://github.com/TanStack/router/blob/4568b38b69b5a649484a8168f4765de97c10f193/packages/react-router/src/router.ts
we can see that the trimmed path is the key that is used for the object at runtime.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-nychtyxe
Steps to Reproduce the Bug or Issue
Expected behavior
The typing for the property should match the runtime type i.e. without slashes
Screenshots or Videos
Platform
All
Additional context
The included link goes to a StackBlitz where you can quickly see the problem in action by comparing the interface and the actual runtime types.
The text was updated successfully, but these errors were encountered: