When serving the app, the type checks ( and the whole build ) fails.
Stack Trace/Error Message:
ERROR in node_modules/@angular-redux/store/lib/src/components/ng-redux.d.ts(10,31): error TS2420: Class 'NgRedux<RootState>' incorrectly implements interface 'ObservableStore<RootState>'.
Types of property 'dispatch' are incompatible.
Type 'Dispatch<RootState>' is not assignable to type 'Dispatch<AnyAction>'.
Type 'RootState' is not assignable to type 'AnyAction'.
node_modules/@angular-redux/store/lib/src/components/ng-redux.d.ts(37,33): error TS2344: Type 'RootState' does not satisfy the constraint 'Action<any>'.
node_modules/@angular-redux/store/lib/src/components/root-store.d.ts(18,24): error TS2344: Type 'RootState' does not satisfy the constraint 'Action<any>'.
Additional Notes:
(optional)
This is a new project, created with the latest versions of everything.
Also, I checked the typings, and it seems the dispatch property on the NgRedux class uses the RootState template argument, instead of a generic action
This is a...
What toolchain are you using for transpilation/bundling?
ngc
Environment
NodeJS Version:v8.11.1 Typescript Version:2.8.1 Angular Version: 5.2.0 @angular-redux/store version: ^7.1.1 @angular/cli version: (if applicable) 1.7.4 OS: macOS High Sierra 10.13.4
Link to repo showing the issus
(optional, but helps a lot) https://github.com/stochris/angular-redux-repro
Expected Behaviour:
The type checks should work
Actual Behaviour:
When serving the app, the type checks ( and the whole build ) fails.
Stack Trace/Error Message:
Additional Notes:
(optional)
This is a new project, created with the latest versions of everything.
Also, I checked the typings, and it seems the
dispatch
property on theNgRedux
class uses the RootState template argument, instead of a generic action