-
-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v0.40.0 template type problems #1694
Comments
I can't reproduce this problem in project in my hand, if you can add a test case to https://github.com/johnsoncodehk/volar/tree/master/packages/vue-test-workspace or provide minimal reproduction it will be helpful. |
I have the same issue, and every time the variable/function is used in a <script setup lang="ts">
const thing = 42; // 'thing' is declared but its value is never read. ts(6133)
</script>
<template>
<div v-if="true"></div>
<div v-else>{{ thing }}</div>
</template> |
Unfortunately I am still experiencing template type issues in a project using Having to explicitly downgrade the version in vscode when these updates land with regressions is a little difficult to manage, especially when having to communicate the problem with multiple team members who all need to not only manually downgrade themselves to keep working effectively, but need to remember to upgrade again when it's fixed. Shameless plug, but it would be really nice if |
Another clue - it appears this is only the case in components that are not yet using |
@danielwaltz just guessing it might be related to 412e985. For vue 2.7 project, please make sure you have config target 2.7 not target 2 in tsconfig. {
"vueCompilerOptions": {
"target": 2.7
}
} If still not working, you can also try setup {
"vueCompilerOptions": {
"target": 2.7,
"experimentalImplicitWrapComponentOptionsWithVue2Extend": true
}
}
Unfortunately it probably won't happen soon, This request may be more worth looking forward to: microsoft/vscode#138048 |
The target in my I also just tested out enabling the Really appreciate the additional information on a version locking feature too, it's true that Microsoft supporting extension version locking in their workspace recommendations would also be an excellent solution. Understandable with the speed of iteration that now maybe wouldn't be the best time for that feature. Still hoping for it one day! |
Hi,
Since upgrading to
v0.40.0
some of my Vue component templates stopped detecting types, e.g. on hover where I see a type inv0.39.5
I don't see it anymore inv0.40.0
.I also see some of variables, for example computed property defined in
script setup
marked as not used, even though I'm using them in thetemplate
.Sorry for being sparse with the details, I just am not sure what else than version number and behavior I could provide 😊
[edit] I also found out that when I run
Volar: Verify All Scripts
inv0.40.0
I got about 5 errors, but I get none inv0.39.5
and I'm almost certain that errors are false positives.The text was updated successfully, but these errors were encountered: