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

Generic component defined using <script setup lang="ts" generic="..." is not importable into a defineComponent() defined component. #8518

Closed
Chuuone opened this issue Jun 8, 2023 · 1 comment

Comments

@Chuuone
Copy link

Chuuone commented Jun 8, 2023

Vue version

3.3.4

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-bw3jzn?file=src%2Fcomponents%2FHelloWorld.vue,integrations.vscode.userData.settingsRaw,src%2FApp.vue

Steps to reproduce

Stack-blitz fails to show the error, however running the project locally from your own Vs-code editor will trigger a type error in App.vue where HelloWorld.vue is being set as a child component of App.vue

What is expected?

The type to be infered correctly when importing HelloWorld.vue as a child component of App.vue

What is actually happening?

A type error occurs when importing the HelloWorld component into App.vue component.

No overload matches this call.
  The last overload gave the following error.ts(2769)
HelloWorld.vue(52, 19): Did you mean to call this expression?
runtime-core.d.ts(1245, 25): The last overload is declared here.

System Info

No response

Any additional comments?

Example of the issue occurring in private project
image

@Chuuone
Copy link
Author

Chuuone commented Jun 14, 2023

Closing as this issue is directly related to vuejs/language-tools#2709

@Chuuone Chuuone closed this as completed Jun 14, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant