title: Missing type annotation for a type parameter declared in function type that was implicitly instantiated at call of combineReducers
body: <p>I am getting the following error on combineReducers in Redux now.</p>
  
  <p>Missing type annotation for <code>A</code>. <code>A</code> is a type parameter declared in function type [1] and was implicitly instantiated at call of <code>combineReducers</code> [2].</p>
  
  <p>The code looks as follows, but is ocurring in all of my reducers that use combineReducers.</p>
  
  <pre><code>export default combineReducers({
    status: ((state: boolean = true, action: Action) =&gt; {
      switch (action.type) {
        case 'START_SESSION':
        case 'REFRESH_AUTH_SUCCEEDED':
        case 'SIGN_IN_FAILED':
        case 'SIGN_OUT':
          return false;
        default:
          return state;
      }
    }: Reducer&lt;*&gt;),
  });
  </code></pre>
  
  <p>I believe it is because of this type definition in the Redux flow-types</p>
  
  <pre><code>
  declare export function combineReducers&lt;O: Object, A&gt;(reducers: O): 
         CombinedReducer&lt;$ObjMap&lt;O, &lt;S&gt;(r: Reducer&lt;S, any&gt;) =&gt; S&gt;, A&gt;;
  
  </code></pre>
  
  <p>I believe this has to do with the release of Flow, version 0.85.0 which introduced some stuff having to do with "implicit instantiations."</p>
  
  <p>I read this article on Medium by the FLow's own Sam Goldman and that is how I came to this conclusion.
  <a href="https://medium.com/flow-type/asking-for-required-annotations-64d4f9c1edf8" rel="noreferrer">https://medium.com/flow-type/asking-for-required-annotations-64d4f9c1edf8</a></p>
  
  <p>I was able to get the error to go away by doing the following which is my attempt at implementing something like the articles mention of the solution "providing explicit type argument to the function call."</p>
  
  <pre><code>export default combineReducers&lt;Object, Action&gt;({
    status: ((state: boolean = true, action: Action) =&gt; {
      switch (action.type) {
        case 'START_SESSION':
        case 'REFRESH_AUTH_SUCCEEDED':
        case 'SIGN_IN_FAILED':
        case 'SIGN_OUT':
          return false;
        default:
          return state;
      }
    }: Reducer&lt;*&gt;),
  });
  </code></pre>
  
  <p>I did this because I saw that the function definition in the Redux docs was </p>
  
  <pre><code>combineReducers&lt;O: Object, A&gt;
  
  </code></pre>
  
  <p>But I do not fully understand why this works or know whether this is actually the right solution or makes no sense and I just got lucky. I have tried to search Google for IMPLICIT INSTANTIATIONS but I don't really find anything. I ready this article but I still dont know exactly what the return type of the call should be annotated as based on </p>
  
  <pre><code>combineReducers&lt;O: Object, A&gt;
  
  </code></pre>