I have slice
const investment = createSlice({
name: 'investments',
initialState,
reducers: {
getInvestmentsRequest(state) {
state.investments.status = RequestStatuses.loading;
},
}
})
And action is intercepted by middleware. Middleware use payload. But in slices I am not need use payload. If I set payload as second argument eslint will throw error with unused vars. Caller code:
dispatch(getInvestmentsRequest({ term: product.term }));
And I have TS error Expected 0 arguments, but got 1.
Anybody know how to resolve this typechecking conflict with TS, Redux Toolkit (slice) and redux-saga ?