title: Get action types from Redux Toolkit's createSlice
body: <p>I'm using <code>createSlice</code> together with <code>useReducer</code>.</p>
  <p>I'd like the dispatch to be typed properly, that is <code>React.Dispatch&lt;ReducerActions&gt;</code>.</p>
  <h2>How do I extract action types from <code>createSlice</code>?</h2>
  <p>The following does not work, it resolves to <code>AnyAction</code>... which is understandable I'd say, as all actions pass through all reducers.</p>
  <pre><code>Dispatch&lt;Parameters&lt;typeof slice[&quot;reducer&quot;]&gt;[1]&gt;
  </code></pre>