We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to create generic component.
I managed to create component with generic props using this tutorial: https://logaretm.com/blog/generically-typed-vue-components/
However, it does not help to create generic slots because "script" section contains no information about slots.
Adding slots definitions to defineComponent would allow to use technique described here: https://logaretm.com/blog/generically-typed-vue-components/ to create generic slots.
defineComponent({ slots: { slot1: { name: "slot-name", data: SlotDataType<{ a: string, b: number }> } } })
Then tools like Valor could extract slot data types from DefineComponent.
The text was updated successfully, but these errors were encountered:
Volar already extracts the slot typing. Duplicate of #3102 (Generic components)
Sorry, something went wrong.
No branches or pull requests
What problem does this feature solve?
I am trying to create generic component.
I managed to create component with generic props using this tutorial:
https://logaretm.com/blog/generically-typed-vue-components/
However, it does not help to create generic slots because "script" section contains no information about slots.
Adding slots definitions to defineComponent would allow to use technique described here:
https://logaretm.com/blog/generically-typed-vue-components/
to create generic slots.
What does the proposed API look like?
Then tools like Valor could extract slot data types from DefineComponent.
The text was updated successfully, but these errors were encountered: