johnsoncodehk / vue-tsc

vue-tsc --noEmit && vite build
https://www.npmjs.com/package/vue-tsc
MIT License
241 stars 6 forks source link

v-for | variable is declared but its value is never read | ts(6133) #59

Closed Shinigami92 closed 3 years ago

Shinigami92 commented 3 years ago

I have a v-for where I don't need the variable but the index.

How can I workaround that? Something like using underscore to suppress the error doesn't work 🙁

image

//- ...
v-col(cols="12", v-for="(line, index) in customText.lines1", :key="`l1-${index}`")
  //-                    ~~~~ 'line' is declared but its value is never read.ts(6133)
  v-text-field(
    v-model="customText.lines1[index]"
  )
  //- ...
johnsoncodehk commented 3 years ago

Blocking by upstream, see https://github.com/johnsoncodehk/volar/issues/329.

Shinigami92 commented 3 years ago

My workaround for now:

:_ignoreLine="line",

🤣