Can you strongly type or validate path parameters? #1666
-
I have a route with a path parameter that is union of string literals.
Is there a way to strongly type that $mailbox is MailboxName, so that TS flags Currently I have a check in my |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I think |
Beta Was this translation helpful? Give feedback.
-
🚨 parseParams have been deprecated in favour of params.parse |
Beta Was this translation helpful? Give feedback.
I think
parseParams
should do this, no?https://tanstack.com/router/latest/docs/framework/react/api/router/RouteOptionsType#parseparams-method