Home > OS >  How to resolve typescript TS7031 error on v-slot vuejes?
How to resolve typescript TS7031 error on v-slot vuejes?

Time:11-18

I'm using Vue.js 3 with Typescript and vee-validate and I have an error during building project.

semantic error TS7031: Binding element 'field' implicitly has an 'any' type.

This is because I use v-slot with vee validate values in the Field vee-validate component.

  <Field
    name="fieldDate"
    :label="libelle"
    :rules="`formatDateValide:${formatDate}|dateBetween:${formatDate},${dateMin},${dateMax}`"
    v-slot="{field, meta}"
  >

How can I define the types of this valuee or how can I deactivate this error ? Thanks.

CodePudding user response:

You can just add this conf to your tsconfig.json file :

"noImplicitAny": false
  • Related