title: How to type React.useState() which can get multiple types as its value with Typescript
body: <p>I'm trying to type useState() hook which can get number and string type as its value.</p>
  <pre><code>export interface Select {
    selectValue: React.Dispatch&lt;React.SetStateAction&lt;number | string&gt;&gt;;
    ...
  }
  </code></pre>
  <p>And I'm trying to use above component like this,</p>
  <pre><code>const [value, setValue] = React.useState(0);
  &lt;Select selectValue = {setValue} /&gt;
  </code></pre>
  <p>But It gives me this Error.</p>
  <pre><code>Type 'Dispatch&lt;SetStateAction&lt;number&gt;&gt;' is not assignable to type 'Dispatch&lt;SetStateAction&lt;string | number&gt;&gt;'.
    Type 'SetStateAction&lt;string | number&gt;' is not assignable to type 'SetStateAction&lt;number&gt;'.
      Type 'string' is not assignable to type 'SetStateAction&lt;number&gt;'.
  </code></pre>
  <p>How can I resolve this Error?</p>