export type WithDialogProps<T> = WithDialogStateProps<T> & WithDialogDispatchProps;
export const withDialog = (id: string) =>
// TODO: How to make compiler happy with & P instead of & any?
+ // eslint-disable-next-line
<T, P>(component: React.ComponentType<WithDialogProps<T> & any>) =>
connect(mapStateToProps(id), mapDispatchToProps(id))(component);