johnsoncodehk / vue-tsc

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

Typechecking failed after update from 0.2.2 to 0.2.3 #61

Closed cawa-93 closed 3 years ago

cawa-93 commented 3 years ago

See this workflow run. After update to 0.2.3 I got many errors like this:


Error: packages/renderer/src/components/Options/ColorScheme.vue(5,7): error TS2322: Type '"system" | "light" | "dark"' is not assignable to type 'Booleanish | undefined'.
  Type '"system"' is not assignable to type 'Booleanish | undefined'.

Example of affected component: https://github.com/cawa-93/anime-library/blob/7173ca67072c7025ab354f9b08003e549fdea03b/packages/renderer/src/components/Options/ColorScheme.vue

johnsoncodehk commented 3 years ago

This is upstream problem. See #57, #58, https://github.com/vuejs/vue-next/issues/4321, https://github.com/vuejs/vue-next/issues/4322.

You can lock vue-tsc to 0.2.2 and lock vscode-vue-languageservice to 0.26.14 0.26.10 for now.

zigomir commented 3 years ago

Is there a way to ignore this error for now? I couldn't find a way to put @ts-ignore inside v-model

[edit] looking at checked?: Booleanish from InputHTMLAttributes in vue 3, this type originates from 3 months ago. And before it was checked?: boolean.

johnsoncodehk commented 3 years ago

@zigomir vue already resolved it in 3.2.3! But Evan point out radio v-model prop incorrect in volar, I will fix it soon.

johnsoncodehk commented 3 years ago

@zigomir vue already resolved it in 3.2.3! But Evan point out radio v-model prop incorrect in volar, I will fix it soon.

Fixed in vscode-vue-languageservice 0.27.2.

cawa-93 commented 3 years ago

@johnsoncodehk Could you, please, release new vue-tsc with that fix?

johnsoncodehk commented 3 years ago

@cawa-93 you can delete yarn.lock / package-lock.json and reinstall to update vscode-vue-languageservice.