Closed auirarrazaval closed 2 months ago
I cannot reproduce on my machine, could you provide a minimal repro for it?
@KazariEX Will provide one during the weekend!
@KazariEX Actually I think i did identify correctly the issue: I updated the description above and provided a reproduction link
It seems that the repo does not exist.
My bad, now it should be public
我也遇到了差不多的问题,插件已经无法使用,只能回退 2.0.28
没有任何的提示信息,看上去插件没有生效。
same issue, so I returned version 2.0.28 ⬇️ 2.0.28 ⬇️
⬇️ 2.1.x ⬇️
Same issue here, downgrading the extension to 2.0.28 fixed it.
Vue - Official extension or vue-tsc version
2.1.X
VSCode version
1.92.2
Vue version
3.4.48
TypeScript version
5.5.4
System Info
Steps to reproduce
Once I updated the library's version to 2.1.X, all prop types defined in
setup
macros were not correctly inferred inside thetemplate
.What is expected?
The following image is using v2.0.X, where the
src
prop type is correctly inferred asstring | unknown
, and JSDocs are also loadedWhat is actually happening?
In the image below you can (left side) see how I use the
defineProps<Type>()
macros to define the props of my component, but on the template (right side) the type inference of thesrc
prop is not inferred correctlyOddly enough, variables explicitly defined in the
setup
will be inferred correctly. So if I explicitly use the props, the types are loaded correctly:Link to minimal reproduction
repo
Any additional comments?
I have to admit that I tried reproducing a minimal reproduction with a fresh
yearn create vite
, but couldn't reproduce it. However, this issue is happening across all my projects, which use different vue, node, and vite versions. If needed I can try trimming down a project little by little until I find the combination of elements that's triggering the issue, but that would have to wait until the weekendThank you very much for all your help and time that goes into this 🙌
Update: upon further testing, I realized that the issue rises when I use yarn's
nodeLinker: pnp
, I have provided a link that fails. I just did ayarn create vite
and changed yarn topnp