Type checking of route props
#1802
Unanswered
segevfiner
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there any way to type check a route
props
. As it stands it is just aRecord<string, any>
, but it would be nice if it would actually be the actual type of the props expected by the rendered component.To do this we need some way to take a component type and get it's defined props which doesn't seem trivial, and then we can manually use
as
orsatisfies
, or it could even be something vue-router does automatically in it's own types, which would be cool assuming it works well enough to not break anyone's code.Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions