title: TypeScript/Redux. Cannot write interface for Reducer. Error TS2322
body: <p>I cannot understand, why I always gets an error once use the <code>interface ITitleIconSwitch</code> with declarated type for <code>state</code> in it.</p>
  
  <pre><code>interface ITitleIconSwitch {
    'TITLE_ICON_SWITCH': (state: object) =&gt; {
      state: object; // this line provides me with an error stack. But! Without 'state' interface works fine. Why?
      titleSwitch: boolean;
    }
  }
  
  const actionHandlers: ITitleIconSwitch = {
    'TITLE_ICON_SWITCH': state =&gt; ({
      ...state,
      titleSwitch: false
    })
  }
  </code></pre>
  
  <p>The error message:</p>
  
  <blockquote>
    <p>TS2322: </p>
    
    <p>Type '{ [TITLE_ICON_SWITCH]: (state: object) => { titleSwitch: false; }; }' is not assignable to type 'IActionHandlers'.</p>
    
    <p>Type '{ [TITLE_ICON_SWITCH]: (state: object) => { titleSwitch: false;
    }; }' is not assignable to type 'IStateUpdate'.</p>
    
    <p>Property ''STATE_UPDATE'' is missing in type '{ [TITLE_ICON_SWITCH]: (state: object) => { titleSwitch: false; }; }'.</p>
  </blockquote>