title: In Typescript: How to extract separate input and output types for a function?
body: <p>For this function:</p>
  
  <pre><code>function first(x: number, y: string) {
  return {
      a: x,
      b: y
    };
  }
  
  function second(z: typeof first()) {
    return {
      c: 6,
      ...z
    }
  }
  </code></pre>
  
  <p><code>typeof first()</code> is, ofcourse, invalid,</p>
  
  <p>I'd like to use the inferred output type of <code>first</code> in <code>second</code>'s signature.
  Is it possible (I'm assuming no but hope to be surprised)</p>
  
  <p>Thanks!</p>