The rejected
type is defined in the third generic argument.
You can find the docs on that here
export const deleteTodos = createAsyncThunk<
DeleteTodoSuccess,
number,
{
rejectValue: DeleteTodoError
}
>(
CLICK HERE to find out more related problems solutions.