title: Getting error while registering reducers using ActionReducerMap: "not assignable to type 'ActionReducerMap<AppState, Action>"
body: <p>Below is simplified version of my Angular 5 application. I have a reducer, which I want to register in my root module. In <em>LINE A</em> I am getting following error:</p>
  
  <pre><code>ERROR in src/app/store/app.reducers.ts(7,14): error TS2322: Type '{ post: (state: State, action: Action) =&gt; void; }' is not assignable to type 'ActionReducerMap&lt;AppState, Action&gt;'.
    Types of property 'post' are incompatible.
      Type '(state: State, action: Action) =&gt; void' is not assignable to type 'ActionReducer&lt;State, Action&gt;'.
        Type 'void' is not assignable to type 'State'.
  </code></pre>
  
  <p><strong>app.module.ts</strong> : Root module</p>
  
  <pre><code>  imports: [
      ...
      StoreModule.forRoot(reducers)
    ],
  </code></pre>
  
  <p><strong>store/app.reducers.ts</strong> : inside Global store</p>
  
  <pre><code>import {ActionReducerMap} from "@ngrx/store";
  import * as fromPost from "../postDir/store/post.reducers";
  
  export interface AppState {
    post:fromPost.State
  }
  export const reducers: ActionReducerMap&lt;AppState&gt; = { //=======LINE A ======
    post:fromPost.postReducer
  };
  </code></pre>
  
  <p><strong>postDir/store/post.reducers.ts</strong> :inside local store</p>
  
  <pre><code>export interface State{
    query:string
    posts:Post[]
  }
  
  const initialPostState: State = {
    query:"initial",
    posts:[]
  };
  
  export function postReducer(state = initialPostState, action:postActions.PostActions){}
  </code></pre>
  
  <p>Code works fine if I replace <code>&lt;AppState&gt;</code> in <em>LINE A</em> with <code>&lt;any&gt;</code>
  Did anyone else face the similar issue? I tried to google but could not find anything significant.</p>