After package updates, I suddenly get weird typescript errors:
[tsl] ERROR in C:..\\UI\\src\\sagas.ts(40,21) TS2769: No overload match
I also met this problem, but I asked my colleague and learned about the following solution:
redux-saga takes TakeableChannel<unknown>. This is an action, so you declare type of loadIds's argument is shape of action like this:
function* loadIds({
forceReload
}: {
type: string;
forceReload: any; // your forceReload type
}) {
// your code
}
My colleague eventually taught me a workaround:
takeEvery from the original import statement.as Eff where Eff is an alias.import { put, fork, select, call } from 'redux-saga/effects' // <-- modified
import * as Eff from 'redux-saga/effects' // <-- new
// ...
const takeEvery: any = Eff.takeEvery; // <-- new
const takeLatest: any = Eff.takeLatest; // <-- new
As far as I understand him, the idea is to explicity allow any type.
Edit: I am aware that Facebook (as developer of React) does explicitly state that one should not use inheritance, see https://reactjs.org/docs/composition-vs-inheritance.html