When I upgraded to the React 18 types, I got the error text above. Reading through this Stack Overflow thread, it sounds like I could resolve this problem by either:
Exporting a type rather than an interface
Extending ComponentPropsWithoutRef<'td'>
That option is specific to this particular use case: a data cell can do anything that a heading cell can do.
Here's my attempt at a plain-English description of this error:
An interface can't extend a union. Consider using a type alias instead.
Is that description accurate? If so, I'd be happy to contribute that update! If not, I'd love to hear what could be better.
Error Text
An interface can only extend an object type or intersection of object types with statically known members.
Supporting Information
I have code that looks like this:
When I upgraded to the React 18 types, I got the error text above. Reading through this Stack Overflow thread, it sounds like I could resolve this problem by either:
ComponentPropsWithoutRef<'td'>
Here's my attempt at a plain-English description of this error:
Is that description accurate? If so, I'd be happy to contribute that update! If not, I'd love to hear what could be better.
Thank you so much for your time!