<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default class {

}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-kos">{</span>

<span class="pl-kos">}</span></pre></div>
<p dir="auto">compiled code is:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class {
}
exports. = default_1;
"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span>
<span class="pl-s1">exports</span><span class="pl-kos">.</span> <span class="pl-c1">=</span> <span class="pl-c1">default_1</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">compile command is <code class="notranslate">tsc --module commonjs --target ES6 default.ts</code>, TypeScript version is 1.7.5</p>
<p dir="auto">Compiling the following code:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;;
export default class {};"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Using the command line <code class="notranslate">tsc --t es6 --m commonjs</code> produces illegal JavaScript:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;;
class {
}
exports.default = default_1
;"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-k">class</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span>
<span class="pl-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">default</span> <span class="pl-c1">=</span> <span class="pl-s1">default_1</span>
<span class="pl-kos">;</span></pre></div>
<p dir="auto">I realize this is a weird combination of switches, however it seems necessary to target current versions of Node.js/V8 that don't yet natively support ES6 modules.</p>