I have a typescript class component w/ material-ui & redux integrations. When I wrap material-ui with redux there is some confusion about the "inherited" or "merged" prop types. If I export only material-ui integrated or only redux integrated it compiles w/o issue. If I remove the props from mapStateToProps it compiles as well. Of note, This code compiled prior to recent package updates.
I've created a sandbox @ https://codesandbox.io/s/elegant-worker-qtb12?file=/src/App.tsx, the code compiles there ~ but the linter displays the same error I get in my project.
TS2345: Argument of type 'JSXElementConstructor<Omit<{ classes: ClassNameMap<string>; } & { user: User | undefined; }, "theme" | "classes"> & StyledComponentProps<string>>' is not assignable to parameter of type 'ComponentType<Matching<{ user: User | undefined; }, any>>'.
Type '(props: Omit<{ classes: ClassNameMap<string>; } & { user: User | undefined; }, "theme" | "classes"> & StyledComponentProps<string>) => ReactElement<...> | null' is not assignable to type 'ComponentType<Matching<{ user: User | undefined; }, any>>'.
Type '(props: Omit<{ classes: ClassNameMap<string>; } & { user: User | undefined; }, "theme" | "classes"> & StyledComponentProps<string>) => ReactElement<...> | null' is not assignable to type 'FunctionComponent<Matching<{ user: User | undefined; }, any>>'.
Types of parameters 'props' and 'props' are incompatible.
Type 'PropsWithChildren<Matching<{ user: User | undefined; }, any>>' is not assignable to type 'Omit<{ classes: ClassNameMap<string>; } & { user: User | undefined; }, "theme" | "classes"> & StyledComponentProps<string>'.
Property 'user' is missing in type 'PropsWithChildren<Matching<{ user: User | undefined; }, any>>' but required in type 'Omit<{ classes: ClassNameMap<string>; } & { user: User | undefined; }, "theme" | "classes">'.
Note user: User | undefined present on both sides of the equation.