You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implemented Redux-Thunk (2.3.0)
Called a redux-thunk-action via dispatch
No compiler errors
Actual Behaviour:
Compiler error
Stack Trace/Error Message:
TS2345 (TS) Argument of type '(dispatch: any, getState: any) => void' is not assignable to parameter of type 'AnyAction'.
Property 'type' is missing in type '(dispatch: any, getState: any) => void' but required in type 'AnyAction'.
Additional Notes:
Workaround: Cast the returning function of the redux-thunk-action as <AnyAction><any>
Example:
return <AnyAction><any>((dispatch, getState) => { ..... }
This is a...
What toolchain are you using for transpilation/bundling?
ngc
Environment
NodeJS Version: 10.15.3
Typescript Version: 3.2.4
Angular Version: 7.2.15
@angular-redux/store version: 10.0.0
@angular/cli version: 7.3.9
OS: Win7
Link to repo showing the issus
(optional, but helps a lot)
Expected Behaviour:
Implemented Redux-Thunk (2.3.0)
Called a redux-thunk-action via dispatch
No compiler errors
Actual Behaviour:
Compiler error
Stack Trace/Error Message:
TS2345 (TS) Argument of type '(dispatch: any, getState: any) => void' is not assignable to parameter of type 'AnyAction'.
Property 'type' is missing in type '(dispatch: any, getState: any) => void' but required in type 'AnyAction'.
Additional Notes:
Workaround: Cast the returning function of the redux-thunk-action as <AnyAction><any>
Example:
return <AnyAction><any>((dispatch, getState) => { ..... }
This seemed to be fixed #390 a while ago,
but might have been broken again in commit 5ab400f#diff-0d3376051b12933294267bc5c76dac1c
The text was updated successfully, but these errors were encountered: