<p dir="auto">See screenshot for repro code, its much clearer.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1753927/7439840/db615cf0-f0c1-11e4-8c1d-4e29e33a6e5b.png"><img src="https://cloud.githubusercontent.com/assets/1753927/7439840/db615cf0-f0c1-11e4-8c1d-4e29e33a6e5b.png" alt="minimal repro code" style="max-width: 100%;"></a></p>
<p dir="auto">Generated using grunt-typescript 0.6.1/typescript 1.4.1 with the following config:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="typescript: {
            base: {
                src: [&quot;src/**/*.ts&quot;],
                options: {
                    module: &quot;commonjs&quot;, 
                    target: &quot;es5&quot;, 
                    basePath: &quot;src&quot;,
                    sourceMap: false, 
                    declaration: false,
                    references:[
                        &quot;typings/**/*.d.ts&quot;
                    ]
                }
            }
        }"><pre class="notranslate"><code class="notranslate">typescript: {
            base: {
                src: ["src/**/*.ts"],
                options: {
                    module: "commonjs", 
                    target: "es5", 
                    basePath: "src",
                    sourceMap: false, 
                    declaration: false,
                    references:[
                        "typings/**/*.d.ts"
                    ]
                }
            }
        }
</code></pre></div>
<p dir="auto">Assuming its unlikely that grunt-typescript will produce this kind of bug.</p>
<p dir="auto">Hi,</p>
<p dir="auto"><strong>TS Version</strong>: 1.4</p>
<p dir="auto">The following code:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var x: any;
/*
var bar;
*/"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">x</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span>
<span class="pl-c">/*</span>
<span class="pl-c">var bar;</span>
<span class="pl-c">*/</span></pre></div>
<p dir="auto">Emits the following JavaScript</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var x;
/*
var bar;
var x: any;
/*
var bar;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">x</span><span class="pl-kos">;</span>
<span class="pl-c1">/</span><span class="pl-c1">*</span>
<span class="pl-k">var</span> <span class="pl-s1">bar</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">x</span>: <span class="pl-s1">any</span><span class="pl-kos">;</span>
<span class="pl-c1">/</span><span class="pl-c1">*</span>
<span class="pl-k">var</span> <span class="pl-s1">bar</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Expected</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var x;
/*
var bar;
*/"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">x</span><span class="pl-kos">;</span>
<span class="pl-c">/*</span>
<span class="pl-c">var bar;</span>
<span class="pl-c">*/</span></pre></div>