Subscribe on changes!

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

avatar
Jun 8th 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

avatar
Jun 14th 2023

Closing as this issue is directly related to https://github.com/vuejs/language-tools/issues/2709