title: Require argument if unknown type is not undefined
body: <p>How can I type a function that optionally has a second parameter <em>if</em> it's event's data is not undefined?</p>
  <p>For example:</p>
  <pre><code>type Events = {
    a: { bc: number }
    d: undefined
  }
  
  type Fn&lt;T extends Record&lt;string, unknown&gt;&gt; = &lt;E extends keyof T&gt;(event: E, data: T[E]) =&gt; void
  
  const fn: Fn&lt;Events&gt; = getFN();
  </code></pre>
  <p>When someone calls <code>fn('a')</code> Typescript will correctly throw an error because <code>{ bc: number }</code> wasn't supplied. However, <code>fn('d')</code> will throw an error because typescript is expecting <code>fn('d', undefined)</code>.</p>
  <p>How do I drop the requirement to supply <code>undefined</code> for <code>fn('d')</code>?</p>