Open nsnyder opened 4 years ago
This frustrated me to no end. I've literally spent the last two days working on dev environment setup (but hopefully almost there).
This particular issue is most likely related to this: https://github.com/vuejs/vetur/issues/1509
So the hack-workaround for now: ensure all your Composition API setup functions have props. Once you add a props object then you'll notice Vetur's nice problem detection kicks in again.
@rfox12 Thank you! A workaround, to be sure, but one that'll give me a little extra peace-of-mind as I do my day-to-day coding until it's fixed.
I can confirm that adding an empty props
would bring back the red squigglies.
Info
Problem
When I'm using the Vue Composition API plugin in Vue 2, Vetur doesn't surface errors for undefined properties. As demonstrated, this is not an issue with the Options Style version.
Browser output:
VS Code window (split to demonstrate the difference between styles):
Reproducible Case
https://github.com/nsnyder/typescript-sandbox/tree/demonstrate-vetur-issues Clone and run
npm install
then checkout thedemonstrate-vetur-issues
branch.Please let me know how I can help. Vetur is a great tool to help me write better code! Thanks for everything you put into this!