title: Redux-form's dispatch and typescript
body: <p>Currently came through an issue with properly typing <code>dispatch</code> function in redux-form. </p>
  
  <p><code>onSubmit</code> function from redux-form accepts two arguments: </p>
  
  <pre><code>const onSubmit = (values, dispatch) =&gt; {...};
  </code></pre>
  
  <p>However, it's not the exact same <code>dispatch</code> as this one from <code>redux</code>. </p>
  
  <p>I mean, it looses typings. I can type it anyway I want and typescript wont throw any errors, e.g. <code>..., dispatch: Dispatch&lt;{ foo: 'bar' }&gt;)</code> even if there's no <code>foo</code> key anywhere in my component. </p>
  
  <p><code>Dispatch</code> type comes from <code>redux</code> and works fine if using <code>dispatch</code> with <code>connect</code>, e.g. in <code>mapDispatchToProps</code> function.</p>
  
  <p><strong>Q</strong>: How to type the <code>dispatch</code> function in redux-form properly? </p>
  
  <h3>Important:</h3>
  
  <p>When going to <code>Dispatch</code> initialization place, in <code>index.d.ts</code> file in <code>redux</code> node package, there's following interface:</p>
  
  <pre><code>export interface Dispatch&lt;S&gt; {
      &lt;A extends Action&gt;(action: A): A;
  }
  </code></pre>
  
  <p>Why <code>S</code> is being omitted? Is it the reason why if I put anything as an argument for <code>Dispatch</code>, typescript accepts it?</p>
  
  <p>Thanks!</p>