title: How to bind async actions creators using flowtype?
body: <p>I just started learning flowtype and i need some help to understand two things that aren't clear on my mind.</p>
  
  <ol>
  <li><p>Using <a href="https://github.com/reactjs/redux/blob/master/examples/todos-flow" rel="noreferrer">https://github.com/reactjs/redux/blob/master/examples/todos-flow</a> as an example, i wonder how control over types can work without type definitions of <a href="https://github.com/flowtype/flow-typed" rel="noreferrer">https://github.com/flowtype/flow-typed</a>, in this case: <a href="https://github.com/flowtype/flow-typed/blob/master/definitions/npm/redux_v3.x.x/flow_v0.33.x-/redux_v3.x.x.js" rel="noreferrer">https://github.com/flowtype/flow-typed/blob/master/definitions/npm/redux_v3.x.x/flow_v0.33.x-/redux_v3.x.x.js</a> ?</p></li>
  <li><p>If I use redux definitions, the validation of <code>bindActionCreators</code> fails when i try to bind async action creator (i'm using redux-thunk).</p></li>
  </ol>
  
  <p>How to continue using flow and bind async actions creators when using redux-thunk?</p>
  
  <p>Code sample (<a href="https://gist.github.com/momsse/323c228e8c5e264067039b8446cd890f" rel="noreferrer">https://gist.github.com/momsse/323c228e8c5e264067039b8446cd890f</a>) :</p>
  
  <pre><code>import { bindActionCreators } from 'redux';
  import type { Dispatch } from 'redux';
  
  type Action = { type: 'SET_PROFILE', profile: Object };
  
  /**
   * Based on https://github.com/gaearon/redux-thunk/blob/master/index.d.ts
   */
  type ThunkAction = (dispatch: Dispatch&lt;Action&gt;,
                      getState: () =&gt; any,
                      extraArgument: any) =&gt; any;
  
  type Profile = {
    name: string,
    team: string
  }
  
  // Async actions creator
  function setProfile(profile: Profile): ThunkAction {
    return dispatch =&gt; setTimeout(() =&gt; dispatch({ type: 'SET_PROFILE', profile }), 2000);
  }
  
  const profileActionCreators = { setProfile };
  
  type Props = {
    actions: {
      setProfile: (profile: Profile) =&gt; ThunkAction,
    }
  }
  
  function mapDispatchToProps(dispatch: Dispatch&lt;Action&gt;): Props {
    return {
      actions: bindActionCreators(profileActionCreators, dispatch)
    };
  }
  </code></pre>
  
  <p>Errors:</p>
  
  <pre><code> 40:     actions: bindActionCreators(profileActionCreators, dispatch)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function call. Function cannot be called on any member of intersection type
   40:     actions: bindActionCreators(profileActionCreators, dispatch)
                    ^^^^^^^^^^^^^^^^^^ intersection
    Member 1:
     49:   declare function bindActionCreators&lt;A, C: ActionCreator&lt;A, any&gt;&gt;(actionCreator: C, dispatch: Dispatch&lt;A&gt;): C;
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ polymorphic type: function type. See lib: flow-typed/npm/redux_v3.x.x.js:49
    Error:
     49:   declare function bindActionCreators&lt;A, C: ActionCreator&lt;A, any&gt;&gt;(actionCreator: C, dispatch: Dispatch&lt;A&gt;): C;
                                                     ^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in. See lib: flow-typed/npm/redux_v3.x.x.js:49
     40:     actions: bindActionCreators(profileActionCreators, dispatch)
                                         ^^^^^^^^^^^^^^^^^^^^^ object literal
    Member 2:
     50:   declare function bindActionCreators&lt;A, K, C: ActionCreators&lt;K, A&gt;&gt;(actionCreators: C, dispatch: Dispatch&lt;A&gt;): C;
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ polymorphic type: function type. See lib: flow-typed/npm/redux_v3.x.x.js:50
    Error:
     13:   declare type Dispatch&lt;A: { type: $Subtype&lt;string&gt; }&gt; = (action: A) =&gt; A;
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^ property `type` of object type. Property not found in. See lib: flow-typed/npm/redux_v3.x.x.js:13
     21: function setProfile(profile: Profile): ThunkAction {
                                                ^^^^^^^^^^^ function type
  </code></pre>