-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
Shallow variables are being unwrapped in template #4948
Comments
It's caused by #4902 which has been reverted. |
@KazariEX hey. In which version has been reverted? I installed the latest of |
Came here at the exact same time with the same question as @Perdolique. I just upgraded to 2.1.8 and am now getting a bunch of type errors that look to be this issue. The linked PR says it appears in 2.1.8, which doesn't make sense because this issue is filed as being about 2.1.8 as well. We'll skip 2.1.8, ideally 2.1.9 could be released soon with the issue actually fixed. |
Please fallback to |
Ahh, I see the revert. It seems like hasn't been released yet. |
Vue - Official extension or vue-tsc version
2.1.8
VSCode version
1.94.2
Vue version
3.5.12
TypeScript version
5.6.3 and 5.7.0-dev.20241026
System Info
package.json dependencies
Steps to reproduce
2.1.8
of theVue - Official
VSCode extensionitem.name.value
is marked as incorrectWhat is expected?
The template for
{{ item.name.value }}
should be correct, since the array is shallow, which means the name property needs to be accessed usingname.value
.What is actually happening?
vue-tsc unwraps the refs inside
items
, meaning that it marksitem.name.value
as incorrect, and only acceptsitem.name
.Link to minimal reproduction
https://github.com/Joery-M/vue-sfc-issue
Any additional comments?
This becomes an issue during assignment, like with
v-model
or inside a callback function, since the value will be replacing the ref, instead of the value inside the ref. This can lead to breaking the application.The text was updated successfully, but these errors were encountered: