<p dir="auto">I wrote a typescript file like this:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// source to typescript
var Test = {};
export = Test;

/**
some infomation about this module
*/"><pre class="notranslate"><span class="pl-c">// source to typescript</span>
<span class="pl-k">var</span> <span class="pl-smi">Test</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-c1">=</span> <span class="pl-smi">Test</span><span class="pl-kos">;</span>

<span class="pl-c">/**</span>
<span class="pl-c">some infomation about this module</span>
<span class="pl-c">*/</span></pre></div>
<p dir="auto">when i run commond <code class="notranslate">tsc --module commonjs test.ts</code>, the javascript file was</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/**
 * @fileOverview ...
 */
// source to typescript
var Test = {};
module.exports = Test;
/**
some other infomation about this module
/**
 * @fileOverview ...
 */
// source to typescript
var Test = {};
export = Test;

/**
some other infomation about this module
"><pre class="notranslate"><span class="pl-c">/**</span>
<span class="pl-c"> * <span class="pl-k">@fileOverview</span> ...</span>
<span class="pl-c"> */</span>
<span class="pl-c">// source to typescript</span>
<span class="pl-k">var</span> <span class="pl-v">Test</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-v">Test</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c">some other infomation about this module</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * <span class="pl-k">@fileOverview</span> ...</span>
<span class="pl-c"> */</span>
<span class="pl-c">// source to typescript</span>
<span class="pl-k">var</span> <span class="pl-v">Test</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-s1">export</span> <span class="pl-c1">=</span> <span class="pl-v">Test</span><span class="pl-kos">;</span>

<span class="pl-c1">/</span><span class="pl-cce"></span><span class="pl-c1">*</span><span class="pl-c1">*</span>
<span class="pl-s1">some</span> <span class="pl-s1">other</span> <span class="pl-s1">infomation</span> <span class="pl-s1">about</span> <span class="pl-smi">this</span> <span class="pl-smi">module</span></pre></div>
<p dir="auto">of course, Syntax error</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="D:\Users\wxq\test.js:14
export = Test;
^^^^^^
SyntaxError: Unexpected reserved word
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3"><pre class="notranslate"><code class="notranslate">D:\Users\wxq\test.js:14
export = Test;
^^^^^^
SyntaxError: Unexpected reserved word
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3
</code></pre></div>
<p dir="auto">There will be such a problem in typescript.org <a href="http://www.typescriptlang.org/Playground#src=%2F**%0D%0A%20*%20%40fileOverview%20...%0D%0A%20*%2F%0D%0A%2F%2F%20source%20to%20typescript%0D%0Avar%20Test%20%3D%20%7B%7D%3B%0D%0Aexport%20%3D%20Test%3B%0D%0A%0D%0A%2F**%0D%0Asome%20other%20infomation%20about%20this%20module%0D%0A*%2F" rel="nofollow">playground</a></p>
<p dir="auto">But i just want to write some msgs at the end of the file.</p>
<p dir="auto">If there is no problem by <a href="http://www.typescriptlang.org/Playground#src=%2F**%0D%0A%20*%20%40fileOverview%20...%0D%0A%20*%2F%0D%0A%2F%2F%20source%20to%20typescript%0D%0Avar%20Test%20%3D%20%7B%7D%3B%0D%0Aexport%20%3D%20Test%3B%0D%0A%0D%0A%2F%2Fsome%20other%20infomation%20about%20this%20module%0D%0A" rel="nofollow">using <code class="notranslate">//</code></a>, or move the comments at the end <a href="http://www.typescriptlang.org/Playground#src=%2F**%0D%0A%20*%20%40fileOverview%20...%0D%0A%20*%2F%0D%0A%2F%2F%20source%20to%20typescript%0D%0A%2F**%0D%0Asome%20other%20infomation%20about%20this%20module%0D%0A*%2F%0D%0Avar%20Test%20%3D%20%7B%7D%3B%0D%0Aexport%20%3D%20Test%3B%0D%0A%0D%0A" rel="nofollow">to top</a></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>