<p dir="auto">Since TypeScript is a superset of JavaScript it should be possible to compile ES6 code without errors.</p>
<p dir="auto">This valid ES6 snippets throws the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error:(3, 14) TS2339: Property 'weight' does not exist on type 'Car'."><pre class="notranslate"><code class="notranslate">Error:(3, 14) TS2339: Property 'weight' does not exist on type 'Car'.
</code></pre></div>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Car {
    constructor(weight) {
        this.weight = weight;
    }
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Car</span> <span class="pl-kos">{</span>
    <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">weight</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">weight</span> <span class="pl-c1">=</span> <span class="pl-s1">weight</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Is this a bug or a 'feature'?</p>
<p dir="auto">The following snippet is valid ES6, but does not compile due to the undeclared property <code class="notranslate">thing</code>. Since TypeScript is aiming to be a superset of ES6, how will this situation be approached?</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Thing {
    constructor() {
        this.thing = 12;
    }
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Thing</span> <span class="pl-kos">{</span>
    <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">thing</span> <span class="pl-c1">=</span> <span class="pl-c1">12</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>