Skip to content

styled-components hits instantiation limit after re-aliasing support (#42284) #42320

@sandersn

Description

@sandersn
export type StyledComponentPropsWithRef<
    C extends keyof JSX.IntrinsicElements | React.ComponentType<any>
> = C extends AnyStyledComponent
    ? React.ComponentPropsWithRef<StyledComponentInnerComponent<C>> // error is here
    : React.ComponentPropsWithRef<C>;

This is very likely because there are more type identities than before. I'm not sure whether the fix will have to be here or on the styled-components types.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions