custom Props type name and explicit annotation on destructured props ? #740
isimmons
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If I apply what I am used to in other frameworks I would type a component something like this
Now this works inside the Button.astro component but completion and type errors are gone in the parent component.
I see from the documentation that the Astro extension automatically looks for 'Props' and uses it so that's why everything works when I do it the Astro docs way. Also if I try to add children in the example above to enforce something is passed for the slot, I get type errors so I guess this is something tied in with the slot type.
My question is, is there a way to do it like my example or are there any plans on making this possible in the future?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions