Just getting started with Typescript and using VSCode.
Encountering the following Error:
*[ts] Argument of type 'void' is not assignable to parameter of type 'Action'. (parameter) action: void
Here is the code snippet causing the error:
loadItems() {
return this.Apiname.find()
.map(
(data) => console.log("data:", data)
)
.map(
payload => ({
type: 'LOAD_ITEMS',
payload: payload
},
)
)
.subscribe(
action => this._store.dispatch(action)//Error
);
};
Any assistance would be greatly appreciated.