Closed WIStudent closed 1 month ago
vue-tsc@2.1.6
I did not use VSCode
vue@3.5.11
typescript@5.6.3
No response
Create a simple component like this: FooBar.vue
FooBar.vue
<script setup lang="ts"> const foo = "bar"; </script> <template> <div> {{ foo }} </div> </template>
npx vue-tsc --noEmit
vue-tsc should run without errors.
vue-tsc returns the following error:
src/components/FooBar.vue:2:7 - error TS6133: 'foo' is declared but its value is never read. 2 const foo = "bar";
This does not happen if I downgrade to vue-tsc@2.1.4
vue-tsc@2.1.4
Nevermind, I still had
"vueCompilerOptions": { "skipTemplateCodegen": true }
inside my tsconfig.json. Removing it fixed the issue.
tsconfig.json
Vue - Official extension or vue-tsc version
vue-tsc@2.1.6
VSCode version
I did not use VSCode
Vue version
vue@3.5.11
TypeScript version
typescript@5.6.3
System Info
No response
package.json dependencies
No response
Steps to reproduce
Create a simple component like this:
FooBar.vue
npx vue-tsc --noEmit
What is expected?
vue-tsc should run without errors.
What is actually happening?
vue-tsc returns the following error:
Link to minimal reproduction
No response
Any additional comments?
This does not happen if I downgrade to
vue-tsc@2.1.4