Skip to content
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

Type error with vue2 component defined by setup script #1391

Closed
kingyue737 opened this issue Jun 4, 2022 · 1 comment
Closed

Type error with vue2 component defined by setup script #1391

kingyue737 opened this issue Jun 4, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@kingyue737
Copy link
Contributor

image

Reproduce:
npm init create-vue@2
and open the project with volar take-over mode on.

Although IDE complains about this error, running vue-tsc won't detect anything.
It's a little strange that I didn't notice this error until yesterday. Maybe it's a bug added in a recent version.

Similarly, I add an unit test, the render function accepts a component defined by defineComponent with no error but complains while using a component defined by <script setup>.

image

@kingyue737
Copy link
Contributor Author

The same error in router/index.ts

It seems that all components defined by <script setup> have type error in .ts file

image

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants