Why does defineProps<RouteParams<...>> fail with a Vue compiler error? #776
Unanswered
spaansba
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use typed route params as component props and I'm wondering what the recommended pattern is.
Right now I'm attempting the following, because I really like getting props via
definePropsinstead of usinguseRoute:This gives a compiler error:
This seems weird to me because the following does work:
I am not getting it, why am i not getting a typeerror but I am getting an error in my console?
Environment:
unplugin-vue-router: 0.19.1
vue: 3.5.22
vue-router: 4.6.3
Beta Was this translation helpful? Give feedback.
All reactions