Get fullPath and params from interpolated pathname
Hey everyone, is there a utility exported from tanstack that would be able to tell me based on a list of routes and a pathname, which route said pathname matches? Something like
My use-case (right now, but there are probably more) is for code ownership attribution during end-to-end testing, I have the list of routes (from the manifest at the bottom of the routeTree.gen) and the URL where the error happened, and I'd like to match those 2 together.
---
If this doesn't exist for an arbitrary list of routes, does it exist with a router? Something link
router.findMatch('/foo/bar') // '/_auth/foo/bar'
1 Reply
fair-rose•7mo ago
router.matchRoutes()
?