You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.
Comment
Hi there,
I'm working on a component library and there is a type generation behavior I don't quite understand.
Here is an example. Notice that ButtonProps in the .D.TS tab is inlined (duplicated) in the Button declaration.
I have another component that uses a type union in its prop types and I don't see the prop types being inlined in the component declaration there. So I tried this - no type inlining 🤷♂️
Could you please help me understand why the type inlining happened in the first example and how to avoid it without the weird T | T or using an interface?
Thanks in advance for any help 🙏
The text was updated successfully, but these errors were encountered:
Acknowledgement
Comment
Hi there,
I'm working on a component library and there is a type generation behavior I don't quite understand.
Here is an example. Notice that
ButtonProps
in the.D.TS
tab is inlined (duplicated) in the Button declaration.I have another component that uses a type union in its prop types and I don't see the prop types being inlined in the component declaration there. So I tried this - no type inlining 🤷♂️
Also using an interface here seems to fix this issue too.
Could you please help me understand why the type inlining happened in the first example and how to avoid it without the weird
T | T
or using an interface?Thanks in advance for any help 🙏
The text was updated successfully, but these errors were encountered: