10

Does Vuelidate support typescript in VueJs? If yes, how to use?

I am able to use it with JavaScript.

3 Answers 3

11

Looks like the types for this library are shipped separately.

Just install @types/vuelidate with npm or yarn

Sign up to request clarification or add additional context in comments.

4 Comments

Also make sure to install it as a dev dependency, as you don't need to build it into your website. You can do so by entering npm i @types/vuelidate -D
I tried installing using types, but no luck. Am I doing something wrong?,
I had to cast vuelidate to any like below. Then it worked. Vue.use(Vuelidate as any)
what's the type for the v variable (e.g. when passing it components)? Thanks!
2

Update 2023

Types are included in @vuelidate/core

Comments

0

You may want to check this github thread. Specifically this one works for me.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.