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

ComponentInstance doesn't work on a generic component with defineSlots #12210

Open
andreww2012 opened this issue Oct 18, 2024 · 0 comments
Open

Comments

@andreww2012
Copy link

Vue version

3.5.12

Link to minimal reproduction

https://play.vuejs.org/#eNqFUk1v1DAQ/SsjCym7UpUVrLiEbCSKKiiHUrG9YYTSZDa4OGPLdsJWq/x3xg5dqn5xSTzz3thv3sxBvLc2HwcUhSh945QN4DEMFnRN3UaK4KWoJKneGhfgAOHWInwwHBJSOCcfamoQJtg500PGN2VH9kckdKo5sv9y8tVDIArI3kmSlK5/CF86Yz1sHj9bRrrZPSoofXCKuqr6lr2ysTj7Hi8vV3OH3A8HAXur64AcAZStGqtyFb+Rdw8TJ+xBY2inuvzGG2KjDrFCioafUxrdFxuUIfapgIRErNba/P6ccsENeHKXb35i8+uJ/I3fx5wUlw49uhGlOGKhdh2GGT7bXuCez0ewN+2gmf0C+BW90UPUONNOB2pZ9j1eUnuehsa2XfmzfUDyd01FoZE5Jb4UPKzo9HOt/5O7ztepTtLELj419Je2Drq5gMOrtIMt7hRhWoZFeq0uYJsGnYRdF3Ax9NfoUtQUcGqMxpo4nJZx4nP9Vpvgy7mebmNUwGIJmwpGo1pewqlaLPn3v2X5hGzacxvzY0QX/eP+1vnb/PUbMf0BPTYrPw==

Steps to reproduce

It's not possible to obtain a generic component type using built-in InstanceType helper. So ComponentInstance Vue helper must be used. However, it returns never if a passed component has generic parameter(s) and uses defineSlots with at least 1 slot defined (with any type).

In the reproduction, completely remove defineSlots or remove all slots definitions (leaving only defineSlots<{}>() and the issue will go away.

What is expected?

It returns the component type.

What is actually happening?

It returns never.

System Info

No response

Any additional comments?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants