-
Notifications
You must be signed in to change notification settings - Fork 101
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
fix: typescript for script setup incorrect. #553
Comments
@TrungRueta Would you provide a reproduction via https://template.nuxtjs.org ? 🙏 |
@danielroe HiDaniel! Thank for look my issue <3 I created online sandbox follow you suggest, but sandbox only makesure my demo working on runtime while issue come from mismatch typescript type checking lead to volar incorrect spell checking. so i deploy sandbox to a git , you can clone git, install use yarn then open steps:
Actually i spend hours to try install our package, unplugin-vue2-script-setup from antfu, compare d.ts files , finally i think i found issue:
I hope my explains well enough to located problem. Thank you again for wonderful project!!! |
🐛 The bug
As from version 0.28 we start support script setup. Test files for now only on javascript. In Typescript i found that ref variables not converted to value on template:
Our document still not mention about typescript type, since we use unplugin-vue2-script-setup for script setup, i try to add
unplugin-vue2-script-setup/types
totsconfig.json
. Result is ref variable turn to correct, but now all custom component turn to any.This issue go away if use
@vue/composition-api
withunplugin-vue2-script-setup
. So i think issue come from our package somehow🛠️ To reproduce
Steps to reproduce the behavior:
@nuxtjs/composition-api
unplugin-vue2-script-setup
. add tsconfig.jsonThe text was updated successfully, but these errors were encountered: