<p dir="auto">I have typescript version 1.4.1.0 and have noticed that if I have a return statement that looks something like this in my TS file</p>
<p dir="auto">return<br>
"This is a really long so I had to put it in on it's own line to avoid horizontal scrolling.";</p>
<p dir="auto">after it has been transpiled into the JS file the code ends up looking like this</p>
<p dir="auto">return;<br>
"This is a really long so I had to put it in on it's own line to avoid horizontal scrolling.";</p>
<p dir="auto">This is obviously problematic because the intended return statement will never execute properly now that a semicolon has been added right after the return keyword treating any line after it as if it wasn't part of the return statement to begin with.</p>
<p dir="auto">If this has already been reported somewhere I apologize for the duplicate posting but the search terms I used to find it didn't seem to bring up any result that referenced this problem.</p>
<p dir="auto"><strong>TypeScript Version:</strong> 1.8.4</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type stringType1 = &quot;foo&quot; | &quot;bar&quot;;
type stringType2 = &quot;baz&quot; | &quot;bar&quot;;

interface Temp1 {
    getValue(name: stringType1);
}

interface Temp2 {
    getValue(name: stringType2);
}

function test(t: Temp1 | Temp2) {
    var  z = t.getValue(&quot;bar&quot;); // Error here
}"><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-smi">stringType1</span> <span class="pl-c1">=</span> <span class="pl-s">"foo"</span> <span class="pl-c1">|</span> <span class="pl-s">"bar"</span><span class="pl-kos">;</span>
<span class="pl-k">type</span> <span class="pl-smi">stringType2</span> <span class="pl-c1">=</span> <span class="pl-s">"baz"</span> <span class="pl-c1">|</span> <span class="pl-s">"bar"</span><span class="pl-kos">;</span>

<span class="pl-k">interface</span> <span class="pl-smi">Temp1</span> <span class="pl-kos">{</span>
    <span class="pl-c1">getValue</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">stringType1</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">interface</span> <span class="pl-smi">Temp2</span> <span class="pl-kos">{</span>
    <span class="pl-c1">getValue</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">stringType2</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">function</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s1">t</span>: <span class="pl-smi">Temp1</span> <span class="pl-c1">|</span> <span class="pl-smi">Temp2</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">var</span>  <span class="pl-s1">z</span> <span class="pl-c1">=</span> <span class="pl-s1">t</span><span class="pl-kos">.</span><span class="pl-en">getValue</span><span class="pl-kos">(</span><span class="pl-s">"bar"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Error here</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
I was hoping everything would go fine (which is the case when I only use one interface in the function <code class="notranslate">test</code></p>
<p dir="auto"><strong>Actual behavior:</strong><br>
I get an error: "Cannot invoke an expression whose type lacks a call signature". Is this by design?</p>