Typing issue in template in Intellij Webstorm
Hi, is anyone here using webstorm? I'm getting some wonky typing in the templates (whereas in the script block the types are correct).
VS Code works fine, and I've already submitted a Webstorm bug but just wondering if anyone has run into this and knows a workaround.
Vue 2.7/3
TS 4.7/4.9
@tanstack/vue-query 4.20.5
2 Replies
multiple-amethyst•3y ago
I believe you need some kind of addon to get that working ( ex Volar for vscode).
Typescript by default does not understand template syntax.
conscious-sapphireOP•3y ago
Unfortunately it's not the case. Webstorm has had type assistance in templates out of the box for a long time. But their composition api support is kinda new, and it doesn't seem to like something about UseQueryReturnType 🤷♂️
Thanks for the reply anyway! @MrMentor I'll just wait for them to fix the bug