New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[V4] v-slot's "value" is of type unknown #3969
Comments
Practically impossible till this RFC is approved/implemented. There are possible workarounds that can be implemented in vee-validate codebase like this but it would force devs to use a weird syntax to get this working. Volar actually implemented the RFC under a feature flag in tsconfig. So it is possible to implement it once I figure out how to hack it for Another workaround is to just mark the component |
Got it @logaretm 👍 It sure is a TS limitation, that's a bummer. Seems to me that for now I probably will go with the option of simply applying Thanks for the reply! Feel free to close if you think its best. If that RFC ever gets to be approved, we can probably make this issue back to life for instructing a solution. |
For now to mitigate this I will mark the field slot value as |
What happened?
While opening the example in the Docs for using Vee-Validate along with Quasar, there is a TS error being thrown.
This happens because
value
from thev-slot
is of typeunknown
and Quasar'sq-input
is expecting the value in themodel-value
to be of typestring | number | null | undefined
— which makes perfect sense.So my question is:
value
coming from thev-slot
so it doesn't get its type asunknown
?Reproduction steps
App.vue
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Relevant log output
No response
Demo link
https://stackblitz.com/edit/vee-validate-v4-quasar-framework?file=src%2FApp.vue
Code of Conduct
The text was updated successfully, but these errors were encountered: