title: Typescript not doing case analysis correctly
body: <p>Say we want to define a function that takes in another function and its parameter, and outputs the function called with the parameter. This is a very good example where we'd want typescript to do proper case analysis. See below.</p>
  <pre><code>let fns = {
    A: (x: string) =&gt; 'a' + x,
    B: (y: number) =&gt; 100 + y
  }
  
  type fn = typeof fns[keyof typeof fns]
  
  const combine = &lt;T extends fn&gt;(fn: T, param: Parameters&lt;T&gt;[0]) =&gt; {
    return fn(param)
  }
  </code></pre>
  <p>The problem is that typescript is giving me the following error on the word param (on the line with the word return):
  <code>Argument of type 'string | number' is not assignable to parameter of type 'never'. Type 'string' is not assignable to type 'never'.ts(2345)</code></p>
  <p>For some reason it's combining both types of input into one type, instead of understanding that <code>T</code> will only be one or the other. Help!</p>