After updating @emotion/react to 11.13.3, I start seeing the following type error in HOC (higher-order components):
src/hoc.tsx:7:13 - error TS2322: Type 'P' is not assignable to type 'IntrinsicAttributes & LibraryManagedAttributes<FC<P>, P>'.
Type 'Record<string, unknown>' is not assignable to type 'IntrinsicAttributes & LibraryManagedAttributes<FC<P>, P>'.
Type 'Record<string, unknown>' is not assignable to type 'LibraryManagedAttributes<FC<P>, P>'.
Type 'P' is not assignable to type 'LibraryManagedAttributes<FC<P>, P>'.
Type 'Record<string, unknown>' is not assignable to type 'LibraryManagedAttributes<FC<P>, P>'.
7 return <C {...props} />;
~
Found 1 error in src/hoc.tsx:7
Here is the code that produces this type error above:
Current behavior:
After updating
@emotion/react
to11.13.3
, I start seeing the following type error in HOC (higher-order components):Here is the code that produces this type error above:
After downgrading
@emotion/react
to11.13.0
, the error stops appearing anymore.To reproduce:
npm i
npm run type-check
Expected behavior:
No type error inside the HOC (which is the behavior before
@emotion.react@11.13.3
.Environment information:
react
version: 18.3.1@emotion/react
version: 11.13.3