-
Hi there! First and foremost, amazing work, really loved the idea that everything is typed. Working with this library so far was a breeze. const matchRoute = useMatchRoute();
const result = matchRoute({ to: "/teams/$groupId" })
// ^? false and const matchRoute = useMatchRoute();
const result = matchRoute({ to: "/teams/$groupId", fuzzy: true })
// ^? false In this example, I want to match all routes that matches the passed route so Found a workaround to just cast it, but this somehow seems to be wrong. const matchRoute = useMatchRoute();
const groupMatch = matchRoute({ to: "/teams/$groupId" }) as
| false
| { groupId: string }; What's more interesting, the code works in the browser just fine, so it seems that the types are wrongly inferred, or I'm passing something wrong here. Would appreciate a guidance how to make it work! :D
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
can you please provide a minimal complete example, e.g. by forking one of the existing examples on stackblitz? |
Beta Was this translation helpful? Give feedback.
Thanks, creating a repro repo helped me find an issue - a different Typescript configuration.