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 am creating a Button component where it can be an html button element or an anchor tag based on whether an href prop is passed or not. I am typing my props like so:
It seems to be working fine except when using an event handler, I get this error: Parameter 'e' implicitly has an 'any' type.
However when explicitly setting href to undefined it works fine:
Reproduction
I believe everything is provided in the screenshots but here's the code as text:
Describe the bug
I am creating a Button component where it can be an html button element or an anchor tag based on whether an href prop is passed or not. I am typing my props like so:
It seems to be working fine except when using an event handler, I get this error:
Parameter 'e' implicitly has an 'any' type.
However when explicitly setting href to undefined it works fine:
Reproduction
I believe everything is provided in the screenshots but here's the code as text:
Expected behaviour
I expect that passing
href={undefined}
should not be required.System Info
Which package is the issue about?
No response
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered: