You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An assignment error in the template block is displayed on VSCode with Volar:
But, not displayed by executing npx vue-tsc --noEmit (Currently, the latest version is 0.35.2).
$ npx vue-tsc --noEmit
src/App.vue:4:32 - error TS2339: Property 'value' does not exist on type 'number'.
4 <div>count.value: {{ count.value }}</div>
~~~~~
src/App.vue:13:7 - error TS2322: Type '1' is not assignable to type '0'.
13 const x: 0 = 1;
~
Found 2 errors in the same file, starting at: src/App.vue:4
I've tried some vue-tsc versions, I found no problem with vue-tsc@0.33.9:
$ npx vue-tsc@0.33.9 --noEmit
src/App.vue:4:32 - error TS2339: Property 'value' does not exist on type 'number'.
4 <div>count.value: {{ count.value }}</div>
~~~~~
src/App.vue:6:35 - error TS2322: Type 'string' is not assignable to type 'number'.
6 <button type="button" @click="count = '100'">set '100'</button>
~~~~~
src/App.vue:13:7 - error TS2322: Type '1' is not assignable to type '0'.
13 const x: 0 = 1;
~
Found 3 errors in the same file, starting at: src/App.vue:4
The text was updated successfully, but these errors were encountered:
I have confirmed this issue was resolved in vue-tsc 0.36.0. Thanks for the lighting fast response!
$ npx vue-tsc@0.36.0 --noEmit
src/App.vue:4:32 - error TS2339: Property 'value' does not exist on type 'number'.
4 <div>count.value: {{ count.value }}</div>
~~~~~
src/App.vue:6:35 - error TS2322: Type 'string' is not assignable to type 'number'.
6 <button type="button" @click="count = '100'">set '100'</button>
~~~~~
src/App.vue:13:7 - error TS2322: Type '1' is not assignable to type '0'.
13 const x: 0 = 1;
~
Found 3 errors in the same file, starting at: src/App.vue:4
Sample repo: https://github.com/mascii/volar-and-vue-tsc-testing-on-vue-2
An assignment error in the template block is displayed on VSCode with Volar:
But, not displayed by executing
npx vue-tsc --noEmit
(Currently, the latest version is 0.35.2).I've tried some vue-tsc versions, I found no problem with
vue-tsc@0.33.9
:The text was updated successfully, but these errors were encountered: