title: How to fix typescript error in redux-toolkit?
body: <p>I'm doing a redux-toolkit tutorial with typescript.  But I'm a typescript beginner.</p>
  <p>I don't know what the problem is here. Please give me your insight.</p>
  <p>This is an error message.
  : <strong>TS2322: Type 'number' is not assignable to type 'void | State | WritableDraft'.</strong></p>
  <pre><code>import {CaseReducer, createSlice, PayloadAction} from &quot;@reduxjs/toolkit&quot;;
  
  type State = {
    value: number
  }
  const increment: CaseReducer&lt;State,PayloadAction&lt;number&gt;&gt; = (state, action) =&gt; state.value + action.payload; // error line
  
  export const counterSlice = createSlice({
    name: 'counter',
    initialState: {
      value: 0
    },
    reducers: {
      increment,
      decrement: state =&gt; {
        state.value -= 1
      },
      incrementByAmount: (state, action) =&gt; {
        state.value += action.payload
      },
    },
  })
  
  export const {increment, decrement, incrementByAmount} = counterSlice.actions;
  
  export default counterSlice.reducer;
  </code></pre>