You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
constComponent: React.FC<{children: React.ReactNode}>=({ children })=>{return<div>{children}</div>;};exportconsthoc=<PextendsRecord<string,unknown>>(C: React.FC<P>)=>{return(props: P)=>{return<C{...props}/>;};};hoc(Component);
After downgrading @emotion/react to 11.13.0, the error stops appearing anymore.
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
@[email protected]
.Environment information:
react
version: 18.3.1@emotion/react
version: 11.13.3The text was updated successfully, but these errors were encountered: