title: TypeScript errors when using Redux-Form with React-Redux connect
body: <p>I was falling in love with TypeScript until I found some very discouraging incompatibilities between Redux-Form with React-Redux.</p>
  
  <p>My goal is wrap a <code>reduxForm</code> decorated component with the react-redux <code>connect</code> decorator—this pattern has always worked for me in babel configurations and seems to follow the <a href="https://facebook.github.io/react/docs/higher-order-components.html" rel="noreferrer">HOC</a> methodology. Here's an example:</p>
  
  <pre class="lang-js prettyprint-override"><code>import * as React from 'react';
  import { Dispatch } from 'redux';
  import { connect } from 'react-redux';
  import { reduxForm, Field, InjectedFormProps } from 'redux-form';
  
  interface SampleFormData {
    username: string;
  }
  
  interface SampleFormProps {
    saveData: (data: SampleFormData) =&gt; void;
  }
  
  type AllSampleFormProps = SampleFormProps &amp; InjectedFormProps&lt;SampleFormData&gt;;
  
  const SampleForm: React.SFC&lt;AllSampleFormProps&gt; = (props) =&gt; (
    &lt;form onSubmit={props.handleSubmit(props.saveData)}&gt;
      &lt;Field name="username" component="input" /&gt;
    &lt;/form&gt;
  );
  
  const DecoratedSampleForm = reduxForm&lt;SampleFormData&gt;({ form: "sampleForm" })(SampleForm);
  
  export default connect(
    () =&gt; ({}),
    (dispatch) =&gt; ({
      saveData: (data: SampleFormData) =&gt; dispatch({ type: "SAVE_DATA", data })
    })
  )(DecoratedSampleForm);
  </code></pre>
  
  <p>Here's the errors TypeScript is throwing:</p>
  
  <pre><code>&gt; Argument of type 'DecoratedComponentClass&lt;SampleFormData,
  &gt; Partial&lt;ConfigProps&lt;SampleFormData, {}&gt;&gt;&gt;' is not assignable to
  &gt; parameter of type 'ComponentType&lt;{ saveData: (data: SampleFormData) =&gt;
  &gt; { type: string; data: SampleFormData; }; }&gt;'.
  &gt; 
  &gt; Type 'DecoratedComponentClass&lt;SampleFormData,
  &gt; Partial&lt;ConfigProps&lt;SampleFormData, {}&gt;&gt;&gt;' is not assignable to type
  &gt; 'StatelessComponent&lt;{ saveData: (data: SampleFormData) =&gt; { type:
  &gt; string; data: SampleFormData; };...'.
  &gt; 
  &gt; Type 'DecoratedComponentClass&lt;SampleFormData,
  &gt; Partial&lt;ConfigProps&lt;SampleFormData, {}&gt;&gt;&gt;' provides no match for the
  &gt; signature '(props: { saveData: (data: SampleFormData) =&gt; { type:
  &gt; string; data: SampleFormData; }; } &amp; { children?: ReactNode; },
  &gt; context?: any): ReactElement&lt;any&gt;'.
  </code></pre>
  
  <p>Has anyone found a solution to make react-redux accept the <code>DecoratedComponentClass</code> type? I found a <a href="https://stackoverflow.com/questions/46078452/typing-redux-forms-v7-with-typescript-and-react">suggestion</a> to use a "middle" component but I haven't managed to get this to work with thunk actions. Plus I've found that this creates more problems than it solves in terms of typing the form's props. </p>