Open
Description
Hi, great library, thanks for creating it! I'm using it in React Interactive
Using the Heading
forwardRef
example in the readme the ref
element type implicitly is any
:
For a live reproduction see: https://codesandbox.io/s/polymorphic-inferred-ref-type-zqyl6
<Heading
as="h1"
color="green"
// error: Parameter 'element' implicitly has an 'any' type.
ref={(element) => {}}
>
As h1
</Heading>
Note that when creating a props object to pass to Heading
the ref
element type is inferred correctly:
const propsForHeading: HeadingProps<"h1"> = {
// element type is inferred correctly
ref: (element) => {},
children: "Heading using propsForHeading"
};
...
<Heading {...propsForHeading} />
Metadata
Metadata
Assignees
Labels
No labels