title: combineReducers doesn't infer type
body: <p>I am using <code>combineReducers</code>in my React TypeScript app:</p>
  
  <pre><code>// combinedReducer.ts
  import { combineReducers } from 'redux'
  import reducer1 from './reducer1'
  import reducer2 from './reducer2'
  
  const combinedReducer = combineReducers({
      reducer1,
      reducer2,
  })
  
  export default combinedReducer
  </code></pre>
  
  <p>I understand from <a href="https://redux.js.org/recipes/usage-with-typescript/#type-checking-reducers" rel="nofollow noreferrer">redux documentation</a> that <code>combineReducers</code> should infer it's type based on the combined reducers.</p>
  
  <p>However, for me it does not, even though each combined reducer has its return type recognised:
  <a href="https://i.stack.imgur.com/CGnxZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CGnxZ.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/Af3BI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Af3BI.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/7fwsj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7fwsj.png" alt="enter image description here"></a></p>
  
  <p>( <code>ReturnType&lt;typeof combidedReducer&gt;</code> is <code>unknown</code>)</p>
  
  <p><strong>What is wrong here?</strong></p>
  
  <p>Here are my maximally simplified reducers:</p>
  
  <pre><code>// reducer1.ts
  const initialState: boolean = false
  
  const reducer1 = (state = initialState): boolean =&gt; state
  
  export default reducer1
  </code></pre>
  
  <pre><code>// reducer2.ts
  const initialState: boolean = false
  
  const reducer2 = (state = initialState): boolean =&gt; state
  
  export default reducer2
  </code></pre>