I have a error on typescript, I'm using Redux and Saga as middleware, these is the error:
No overload matches this call. The last overload gave the following error. Argument of type '"MY_EVENTS_LOAD"' is not assignable to parameter of type 'TakeableChannel'.
I want create a watcher, here:
export default function* watcher() {
yield takeEvery(actions.MY_EVENTS_LOAD, getListEventsByUserSaga);
}
And in my saga file have the function
export function* getListEventsByUserSaga(OwnerId: string) {
try {
const events = yield getEventsByOwnerId(OwnerId);
yield put(actions.fetchMyEventsListUserSuccess(events));
} catch (error) {
yield put(actions.fetchMyEventsListUserFailure(error.message));
}
}
this happen when I do my action:
export const fetchMyEventsListUserLoad = (OwnerId: string) => {
return {
type: MY_EVENTS_LOAD,
OwnerId,
};
};
How can implement these of the correct way?