vuelidate: Type error, UseVuelidate() is Ref
Describe the bug UseValidate() is an undefined type, making TypeScript choke.
Reproduction URL https://codesandbox.io/s/red-mountain-2iu82?file=/src/App.vue:700-921
To Reproduce
App.vue:6 - v$.$validate() is accessible within template tag
App.vue:31 - v$.$validate() within script tag has a type error Property '$validate' does not exist on type 'Ref<undefined>'
Expected behavior All type information being accessible - $validate, $errors, $touch, etc.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 3
- Comments: 17 (7 by maintainers)
Commits related to this issue
- fix: UseVuelidate return type https://github.com/vuelidate/vuelidate/issues/925#issuecomment-1008406811 — committed to leonardssh/vuelidate by leonardssh 2 years ago
- fix: UseVuelidate return type (#990) https://github.com/vuelidate/vuelidate/issues/925#issuecomment-1008406811 — committed to vuelidate/vuelidate by leonardssh 2 years ago
Should be out already. Try to upgrade
After last update the problem is gone. Thanks.
Shouldn’t it be ‘v$.value.$validate()’?