Props declaration with different types #13995
Unanswered
mtmsFKoechl
asked this question in
Help/Questions
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.
-
Hi,
firstly, I would like to thank you for this excellent framework.
I really appreciate Vue 3 and the Composition API.
However, I now need some help.
Here is a short demo showing what I am trying to do.
The goal is that if 'foo' has the value 'test', then the 'bar' prop with the generic type should be required.
My question is: is this possible, or have I made a mistake in the type definition? Or do I need to use "defineComponent"?
Please note that the types are in a private TypeScript package and the component is in a private Vue components package.
Thank you in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions