I have a HOC that is connected to redux like this way:
const withSignIn = (WrappedComponent: React.FC<WithSignInProps>) => {
const mapStateToProps = ({ auth }: AuthRootState) => ({
error: auth.error,
loading: auth.loading
});
const mapDispatchToProps = {
signIn
};
return connect(mapStateToProps, mapDispatchToProps)(WrappedComponent);
};
export default withSignIn;
I'm missing return type on function withSignIn but I don't know what type should I cast my function, it's returning a connect() function there, any hint?