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 think this has something to do with the props being known, props become ComponentProps<"button"> | ComponentProps<"a"> instead of the usual ComponentProps<ElementType<any>>. As can either be "button" | "a" so there is a mismatch where As could be "button" but it's props could be ComponentProps<"a">
The text was updated successfully, but these errors were encountered:
Hi, I am trying to use onlyAs to create a button that can have the following types OnlyAs<'button' | 'a' | typeof Link> where Link is next/link. However, whenever I add this I get the error 'href' is declared here. It appears that it doesn't apply unknown to typeof props
Adding constraints lead to errors when using newer versions of @types/react.
This is also the case when using a single prop:
I think this has something to do with the props being known, props become
ComponentProps<"button"> | ComponentProps<"a">
instead of the usualComponentProps<ElementType<any>>
.As
can either be "button" | "a" so there is a mismatch whereAs
could be "button" but it's props could beComponentProps<"a">
The text was updated successfully, but these errors were encountered: