-
Notifications
You must be signed in to change notification settings - Fork 412
"as" polymorphic prop returns incorrect type #1414
Copy link
Copy link
Open
Labels
bug report 🦗Issue is probably a bug, but it needs to be checkedIssue is probably a bug, but it needs to be checkedneeds: complete repro 🖥️Issue need to have complete repro providedIssue need to have complete repro providedneeds: triage 🏷Issue needs to be checked and prioritizedIssue needs to be checked and prioritized
Metadata
Metadata
Assignees
Labels
bug report 🦗Issue is probably a bug, but it needs to be checkedIssue is probably a bug, but it needs to be checkedneeds: complete repro 🖥️Issue need to have complete repro providedIssue need to have complete repro providedneeds: triage 🏷Issue needs to be checked and prioritizedIssue needs to be checked and prioritized
Type
Fields
Give feedbackNo fields configured for issues without a type.
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 thehrefattribute. The type of the component is still returned asStyledComponent<ClassAttributes<HTMLButtonElement> & ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>