Generic Props and type alias Props #398
tsar-boomba
started this conversation in
Proposal
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am currently trying to make polymorphic components in Astro using the HTMLAttributes type from
astro/types
. I have run into the problem that If you make the interface Props generic, its props type will beany
when you use the component. Along with this, I would need to be able to use type aliases for props types to allow "extending" other generic types, which interfaces do not allow.Example syntax
Interface Generics
Type Alias For Props
Beta Was this translation helpful? Give feedback.
All reactions