In Vuejs, while following the Vuelidate installation instructions (https://vuelidate.js.org/#getting-started), I get a warning at:
import Vuelidate from 'vuelidate'
The warning says:
Could not find a declaration file for module 'vuelidate'. 'c:/Users/[myUser]/../../index.js' implicitly has an 'any' type. Try
npm install @types/vuelidate
if it exists or add a new declaration (.d.ts) file containingdeclare module 'vuelidate';
ts(7016)
it appears you are using typescript, and thus Vue requires a type declaration file for all Vuelidate methods and properties. If you run npm install @types/vuelidate
as suggested, the error should go away.
In the future, if you are working with an npm module that has not published types through npm, you will have to write the declaration file yourself, but don't worry about it for now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With