I am creating my first NGRX project with angular and following this tutorial(kindly find all files code here).
When I declare the reducers in my app.mdule.ts, I am facing this compilation error.
Type '(state: Tutorial[] | undefined, action: Actions) => Tutorial[]' is not assignable to type 'ActionReducer<Tutorial[], Action>'.
Types of parameters 'action' and 'action' are incompatible.
Type 'Action' is not assignable to type 'Actions'.
Property 'payload' is missing in type 'Action' but required in type 'RemoveTutorial'.
22 **tutorial: reducer**
~~~~~~~~
src/app/actions/tutorial.actions.ts:20:17
20 constructor(public payload: Tutorial) { }
~~~~~~~~~~~~~~~~~~~~~~~~
'payload' is declared here.
imports: [
BrowserModule,
AppRoutingModule,
StoreModule.forRoot({
tutorial: reducer ///this line is throwing above error
})
],