Closed Mohammed-Mounir closed 1 year ago
Solution:
Import PayloadAction from redux toolkit and pass the payload object definition
function* handleAuthUser({ payload: { fields, isRegister }, }: PayloadAction<{ fields: { [key: string]: string }; isRegister?: boolean }>) { }
dispatching action with payload, produces this typescript error: Argument of type 'string' is not assignable to parameter of type 'TakeableChannel'.
.
export default function watchAuth() { yield takeLatest(startAuth.toString(), handleAuthUser); // Argument of type 'string' is not assignable to parameter of type 'TakeableChannel'.
}
using: "@reduxjs/toolkit": "^1.8.5", "typed-redux-saga": "^1.5.0",