Closed
Description
Specifically I have this action defined.
getTransitionForm: (params: GetTransitionFormParams) =>
(dispatch: Dispatch<RootState>, getState: () => RootState, extraArgument: any) =>
Promise<any>;
When mapped as follows as per your guide from section "Connected Container without OwnProps using Type Inference" https://github.com/piotrwitek/react-redux-typescript-guide#connected-container-with-ownprops
export const mapDispatchToProps = (dispatch: Dispatch<RootState>) =>
bindActionCreators(
{
getTransitionForm,
},
dispatch
);
const dispatchProps = returntypeof(mapDispatchToProps);
The resulting value of dispatchProps is
const dispatchProps: {
getTransitionForm: (params: GetTransitionFormParams) =>
(dispatch: Dispatch<RootState>, getState: () => RootState, extraArgument: any) =>
Promise<any>;
}
I believe after binding it should be.
const dispatchProps: {
getTransitionForm: (params: GetTransitionFormParams) => Promise<any>;
}
Which I expect is not going to be easy to derive.
I only discovered this as I wanted to do something with the returned promise.
Thanks for your great guide.