title: React-select correct onchange value type
body: <p>I have basic select component like this.</p>
  <pre><code>import { Controller } from &quot;react-hook-form&quot;;
  import Select, { StylesConfig } from &quot;react-select&quot;;
  //..
  
  const [universe, setUniverse] = useState&lt;SetStateAction&lt;TOption | unknown&gt;&gt;(null);
  
  &lt;Controller
      name=&quot;universe_id&quot;
      control={control} // this control is imported from react-hook-form nothing special
      rules={{ required: true }}
      render={({ field }) =&gt; (
          &lt;Select
              {...field}
              value={universe}
              onChange={handleUniverseChange}
              options={universeOptions}
              styles={selectStyles as StylesConfig}
          /&gt;
      )}
  /&gt;
  </code></pre>
  <p>And <code>TOption</code> type</p>
  <pre><code>export type TOption = {
    label: string | number;
    value: string | number;
  };
  </code></pre>
  <p>Problem is that I can't set correct type for change handler value.</p>
  <pre><code>const handleUniverseChange = (item: unknown ) =&gt; {
      setUniverse(item);
      setValue(&quot;universe_id&quot;, item.value); // object type is unknown
  };
  </code></pre>
  <p>Try to use <code>TOption</code> type for item also does not work.</p>
  <pre><code>const handleUniverseChange = (item: TOption) =&gt; {
  </code></pre>
  <p>Getting error in this line</p>
  <pre><code>&lt;Select
      {...field}
      value={universe}
      onChange={handleUniverseChange}
  </code></pre>
  <blockquote>
  <p>Error: Type &quot;(item: TOption) =&gt; void&quot; can't assign for &quot;(newValue:
  unknown, actionMeta: ActionMeta) =&gt; void&quot;.</p>
  </blockquote>