"as" polymorphic prop returns incorrect type #1414
Labels
bug report 🦗
Issue is probably a bug, but it needs to be checked
needs: complete repro 🖥️
Issue need to have complete repro provided
needs: triage 🏷
Issue needs to be checked and prioritized
Environment
"next-with-linaria": "^0.7.0"
Description
I'm migrating from Styled-Components to Linaria. So far pretty great! However I think I've found a minor typing issue.
I have a Button component that I frequently use as an anchor tag thusly…
I was pleased to see that this basically works — the browser does correctly render an
<a>
tag in the markup, the link functions, cool. However, Typescript complains about thehref
attribute. The type of the component is still returned asStyledComponent<ClassAttributes<HTMLButtonElement> & ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>
The text was updated successfully, but these errors were encountered: