Closed scscgit closed 1 year ago
Notes:
When using script setup
only, everything is good
When using script lang="ts"
, only 'x' is declared but its value is never read. ts(6133)
When using script setup lang="ts"
, 'x' is declared but its value is never read. ts(6133)
and Property 'x' does not exist on type '...'. ts(2339)
When defining a variable like this:
it yields two errors:
'x' is declared but its value is never read. ts(6133)
Property 'x' does not exist on type 'MyComponent'. ts(2339)
The code using such variable works correctly, and I've been using this syntax since Vue 2 with Vetur. After migrating to Vue 3 with Volar, this type safety and inference in VS Code fails.