Vue2 <template> get "any" type when using custom component
Vue - Official extension or vue-tsc version
2.0.24
VSCode version
1.90.2
Vue version
2.7.10
TypeScript version
5.4.5
System Info
System:
OS: macOS 12.7.3
CPU: (8) x64 Apple M2
Memory: 26.81 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.21.3 - /usr/local/bin/node
npm: 6.14.18 - /usr/local/bin/npm
Browsers:
Chrome: 126.0.6478.127
Safari: 15.6.1
Steps to reproduce
I get "any" type on custom component "HelloWorld" in template.
How can I get exact type instead of "any"?
Link to minimal reproduction
No response
Any additional comments?
No response
I have the same issue with Nuxt 3.11.2 and Typescript 5.4.5
Same issue with Nuxt 2, disable hybrid mode fixes the problem
I have the same issue, I've been waiting for this feature for a long time, praying for it
Same issue with Nuxt 2, disable
hybrid modefixes the problem
This worked for me.
Also, setting the hybrid mode to typescriptPluginOnly also worked.
So, the workaround for now is to set the setting vue.server.hybridMode to either typescriptPluginOnly or false.
I try to disable hybrid mode, but it seems not working for me.
this issue seems use vue-property-decorator problem,if you use setup model with ts, type will work as expected.
this issue seems use vue-property-decorator problem,if you use setup model with ts, type will work as expected.
True