Porting 30K lines of code from Flow to TypeScript
This is wrong: (from the article)<p><pre><code>  function f(leaves: Array&lt;Leaf&gt;, aggregators: Array&lt;Aggregator&gt;): Array&lt;MemsqlNode&gt; {
    &#x2F;&#x2F; The next line errors because you cannot concat aggregators to leaves.
    return leaves.concat(aggregators);
  }
</code></pre>
That&#x27;s just wrong, of course you can&#x27;t concat aggregators and leaves! and Typescript is OK to not accept it. If you want that to be ok, you could do something like<p><pre><code>  [].concat(leaves, aggregators)</code></pre>