J'essaye un exemple très simple de la page redux-saga.Redux saga typecript erreur de type en rendement tous
function* saga(): SagaIterator {
yield takeEvery(T.GET_CREDENTIALS, getCredentials);
}
export default function* rootSaga() {
yield all([
saga(),
]);
}
Mais j'obtiens l'erreur tapuscrit:
Argument of type 'IterableIterator<RootEffect | TakeEffect |
ChannelTakeEffect<any> | PutEffect<any> | ChannelPutEf...' is not
assignable to parameter of type '{ [key: string]: Effect; }'.
Index signature is missing in type 'IterableIterator<RootEffect |
TakeEffect | ChannelTakeEffect<any> | PutEffect<any> |
ChannelPutEf...'.
Ce que je fais mal? Merci pour l'aide
Ce n'était pas moi qui l'ai déprécié. Quoi qu'il en soit, j'ai également commencé à discuter sur github. Et il semble être une solution convenue. https://github.com/redux-saga/redux-saga/issues/1044#issuecomment-312509142 – mauron85