Closed vukmandavid closed 6 years ago
ngc
The sample code at Generating Actions in Beginners' Tutorial is wrong.
The wrong part
constructor( private ngRedux: NgRedux<IAppState>, //<-- IAppState private actions: CounterActions) { } increment() { this.ngRedux.dispatch(this.actions.increment()); //<--Return type of increment is Action } decrement() { this.ngRedux.dispatch(this.actions.decrement()); //<--Return type of decrement is Action }
The TypeScript error: Argument of type 'Action' is not assignable to parameter of type 'IAppState'. Property 'count' is missing in type 'Action'.
It's not the guide but the ts def file
This is a...
What toolchain are you using for transpilation/bundling?
ngc
The sample code at Generating Actions in Beginners' Tutorial is wrong.
The wrong part
The TypeScript error: Argument of type 'Action' is not assignable to parameter of type 'IAppState'.
Property 'count' is missing in type 'Action'.