title: How to correctly type redux-thunk actions & mapDispatchToProps with redux 4.0.1, redux-thunk 2.3.0 & typescript 3.1.3
body: <p>I'm updating the dependencies in my project (redux 4.0.1, redux-thunk 2.3.0, typescript 3.1.3) and I'm having a very hard time finding the correct typings for redux-thunk in both my action declaration as my mapDispatchToProps declaration.</p>
  
  <p>For example, I have the following actions:</p>
  
  <p><em>Normal redux action</em></p>
  
  <pre><code>export interface UpdateRowContent {
      type: typeof Actions.UPDATE_ROW_CONTENT;
      payload: React.ReactNode[];
  }
  export const updateRowContent: ActionCreator&lt;Action&gt; = (content: React.ReactNode[]) =&gt; {
      return { type: Actions.UPDATE_ROW_CONTENT, payload: content};
  };
  </code></pre>
  
  <p><em>Redux-thunk action</em></p>
  
  <pre><code>export interface ToggleModalShown {
      type: typeof Actions.TOGGLE_MODAL_SHOWN;
      payload: {
          isShown: boolean;
          targetType: TargetType;
          packageItemId?: string;
      };
  }
  export function toggleModalShown(
      isShown: boolean,
      targetType: TargetType,
      packageItemId?: string,
  ): any {
      return (dispatch: Dispatch&lt;any&gt;) =&gt; {
          if (isShown) {
              dispatch(clearForm());
          } else if (packageItemId) {
              dispatch(fillForm(packageItemId));
          }
          dispatch({
              type: Actions.TOGGLE_MODAL_SHOWN,
              payload: {isShown: isShown, targetType: targetType, packageItemId: packageItemId ? packageItemId : null},
          });
      };
  }
  </code></pre>
  
  <p>My mapDispatchToProps is as follows:</p>
  
  <pre><code>type DispatchType = Dispatch&lt;Action&gt; | ThunkDispatch&lt;IState, any, Action&gt;;
  
  function mapDispatchToProps(dispatch: DispatchType) {
      return {
          updateRowContent: (content: React.ReactNode[]) =&gt; {
              dispatch(updateRowContent(content));
          },
          toggleModalShown: (isShown: boolean, targetType: TargetType) =&gt; {
              dispatch(toggleModalShown(isShown, targetType));
          },
      };
  }
  </code></pre>
  
  <p>All the things I find online tell me to type the mapDispatchToProps as <code>ThunkDispatch&lt;S,E,A&gt;</code>, which is what I'm currently trying to do.
  The guides tell me to type the actual thunk-action as <code>ActionCreator&lt;ThunkAction&lt;R,S,E,A&gt;&gt;</code></p>
  
  <p>When I try to use <code>ActionCreator&lt;ThunkAction&lt;void,IState,any,Action&gt;&gt;</code> instead of <code>any</code> as type for my redux-thunk, I get the error <code>Argument of type 'ActionCreator&lt;ThunkAction&lt;void, GoState, any, Action&lt;any&gt;&gt;&gt;' is not assignable to parameter of type 'Action&lt;any&gt;'.</code></p>
  
  <p>Any ideas?</p>