title: Correct type declaration for mapStateToProps of Redux connect (TypeScript 2)
body: <p>I have a Redux store and want to connect it. Here an extract from my container component:</p>
  
  <pre><code>interface IProps  {
    states: IAppState;
    actions: IAppProps;
  }
  // mapping state to the props
  const mapStateToProps = ( state: IAppState, ownProps = {} ) =&gt; ({
    states: state
  });
  // mapping actions to the props
  const mapDispatchToProps = ( dispatch: Redux.Dispatch&lt;IAppState&gt; ) =&gt; ({
    actions: Redux.bindActionCreators( actions, dispatch )
  });
  
  // connect store to App
  @connect&lt;IAppState, IAppProps, any&gt;(
    mapStateToProps,
    mapDispatchToProps
  )
  export default class App extends React.Component&lt;IProps, {}&gt; {
  //...
  }
  </code></pre>
  
  <p>When compiling I receive the following issue:</p>
  
  <pre><code>error TS2345: Argument of type '(state: IAppState, ownProps?: {}) =&gt; { states: IAppState; }' is not assignable to parameter of type 'MapStateToPropsParam&lt;IAppState, any&gt;'.
    Type '(state: IAppState, ownProps?: {}) =&gt; { states: IAppState; }' is not assignable to type 'MapStateToPropsFactory&lt;IAppState, any&gt;'.
      Type '{ states: IAppState; }' is not assignable to type 'MapStateToProps&lt;IAppState, any&gt;'.
        Type '{ states: IAppState; }' provides no match for the signature '(state: any, ownProps?: any): IAppState'.
  </code></pre>
  
  <p>I'm using @types/react-redux@4.4.44 that exposes MapStateToProps interface. I would think that my mapStateToProps confronts this interface... Yet something is wrong. Any ideas what is that?</p>