<p dir="auto">It doesn't seem possible to compile and output to stdout. There was some discussion on CodePlex before the migration to github: <a href="https://typescript.codeplex.com/workitem/600" rel="nofollow">https://typescript.codeplex.com/workitem/600</a></p>
<p dir="auto">The compiler incorrectly reports a parameter/call target signature mismatch when using the spread operator. Pasting this code into the TypeScript Playground:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function foo(x: number, y: number, z: number) { }
var args = [0, 1, 2];
foo(...args);"><pre class="notranslate"><code class="notranslate">function foo(x: number, y: number, z: number) { }
var args = [0, 1, 2];
foo(...args);
</code></pre></div>
<p dir="auto">produces this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Supplied parameters do not match any signature of call target."><pre class="notranslate"><code class="notranslate">Supplied parameters do not match any signature of call target.
</code></pre></div>