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.