title: Flow Javascript "Missing type annotation for T" And "Missing type annotation for S"
body: <p>I am taking a class on React Native and then using Flow to try to correct the errors of the class as the instructor is not using any type checking. </p>
  
  <p>I am running into another error with Flow that couldn't find the answer by a long search on the internet. I am getting these two errors on the same lines. I do not know what flow means by these errors. This confuses me and searching the Flow documentation did not serve me as it didn't explain this at all. </p>
  
  <p>I am using Atom with Nuclide and Flow 0.78.</p>
  
  <blockquote>
    <p>Missing type annotation for T.</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>Missing type annotation for S.</p>
  </blockquote>
  
  <p>This is the code with the errors that I marked out.</p>
  
  <pre><code>    /* @flow */
  import { ADD_PLACE, DELETE_PLACE, SELECT_PLACE, DESELECT_PLACE } from '../actions/actionTypes.js'
  
  type State = {
    places: Array&lt;Object&gt;,
    selectedPlace: ?{
    key: string,
    name: string,
    image: Image
  }};
  type Action = { type : string, placeName: string, placeKey: string};
  
  const initialState = {
    places: [],
    selectedPlace: null
  }
  
  
  const reducer = (state : State = initialState, action : Action) =&gt; {
  
    switch (action.type) {
      case ADD_PLACE:
        return {
          ...state,
          places: state.places.concat({ &lt;-- Error
            key: String(Math.random()),
             name: action.placeName,
             image: {
               uri: "https://cdn.newsapi.com.au/image/v1/f08d8ccc83fbc2d08529aea69890ad4d?width=1024"
             }
          })
        };
        case DELETE_PLACE:
        return {
          ...state,
          places: state.places.filter(place =&gt; {. &lt;--Error
              return state.selectedPlace &amp;&amp; place.key !== state.selectedPlace.key;
            }),
            selectedPlace: null
        };
        case SELECT_PLACE:
        return {
          ...state,
          selectedPlace: state.places.find(place =&gt; {  
            return place.key == action.placeKey;
          })
        };
        case DELETE_PLACE:
        return {
          ...state,
          selectedPlace: null
        };
      default:
        return state;
    }
  
  };
  
  export default reducer;
  </code></pre>
  
  <p>These errors are frustrating, and they don't make sense. I am sure I am not the only struggling with this. There are probably others as well. </p>
  
  <p>If anyone knows the answer to this problem. The help would be appreciated. </p>
  
  <p>Also, if anyone can point to some documentation that would translate these kind of Flow errors into something that can be more meaningful or easier to understand that would be a great help as the official documentation doesn't explain too much nor many examples to learn from. </p>
  
  <p>If there is some documentation that is more explicit to be able to learn that would help out greatly as well. </p>
  
  <p>Thanks.</p>