title: A rest element must be last in a tuple type
body: <p>When writing type for <code>cb</code>:</p>
  <pre><code>const fn1 = (
    cb: (...args: [...args: any[], fn2: () =&gt; string, fn3: () =&gt; string]) =&gt; any,
    ...args: any[]
  ) =&gt; {
    const fn2 = () =&gt; 'fn2'
    const fn3 = () =&gt; 'fn3'
    cb(...args, fn2, fn3)
  }
  </code></pre>
  <p>Run <code>tsc</code>, an error is thrown:</p>
  <pre><code>A rest element must be last in a tuple type.
  </code></pre>