title: Returning a promise in a Redux thunk with typescript
body: <p>I am getting this typescript error:  <code>Property 'then' does not exist on type 'ThunkAction&lt;Promise&lt;boolean&gt;, IinitialState, undefined, any&gt;'.</code></p>
  
  <p>Please help!</p>
  
  <p>How I have configured my store and included the type:</p>
  
  <pre><code>    return createStore(
        rootReducer,
        intialState,
        require('redux-devtools-extension').composeWithDevTools(
          applyMiddleware(
            thunk as ThunkMiddleware&lt;IinitialState, any&gt;,
            require('redux-immutable-state-invariant').default()
          )
        )
  </code></pre>
  
  <p>Action Creator:</p>
  
  <pre><code>type ThunkResult&lt;R&gt; = ThunkAction&lt;R, IinitialState, undefined, any&gt;;
  
  export function anotherThunkAction(): ThunkResult&lt;Promise&lt;boolean&gt;&gt; {
    return (dispatch, getState) =&gt; {
      return Promise.resolve(true);
    }
  }
  </code></pre>
  
  <p>then in my component I have a prop interface:</p>
  
  <pre><code>interface IProps {
    anotherThunkAction: typeof anotherThunkAction;
  }
  </code></pre>
  
  <p>Then: </p>
  
  <pre><code>  componentWillMount() {
      this.props.anotherThunkAction().then(() =&gt; {console.log('hello world')})
    }
  </code></pre>
  
  <p>Connect where I am using react-i18next as well:</p>
  
  <pre><code>export default translate('manageInventory')(
    connect(
      mapStateToProps,
      {
        anotherThunkAction
      }
    )(ManageInventory)
  );
  </code></pre>