<p dir="auto"><em>Tested in VSCode 1.2 and in the playground</em></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class A {
    method(): this {
        return this;
    }
}

class B extends A {}

const c = new B().method();"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>
    <span class="pl-en">method</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: this <span class="pl-kos">{</span>
        <span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span>

<span class="pl-k">class</span> <span class="pl-smi">B</span> <span class="pl-k">extends</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>

<span class="pl-k">const</span> <span class="pl-s1">c</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">B</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">method</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><code class="notranslate">c</code>'s type is <code class="notranslate">B</code> (correctly). However, if I call super.method() from B, its return type is A instead of B:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class A {
    method(): this {
        return this;
    }
}

class B extends A {
    method(): this {
        return super.method(); // Type 'A' is not assignable to type 'this'.
    }
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>
    <span class="pl-en">method</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: this <span class="pl-kos">{</span>
        <span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span>

<span class="pl-k">class</span> <span class="pl-smi">B</span> <span class="pl-k">extends</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>
    <span class="pl-en">method</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: this <span class="pl-kos">{</span>
        <span class="pl-k">return</span> <span class="pl-smi">super</span><span class="pl-kos">.</span><span class="pl-en">method</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Type 'A' is not assignable to type 'this'.</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">nightly with "node.d.ts" from typings</p>
<p dir="auto">We recently add <a href="https://github.com/Microsoft/TypeScript/blob/master/src/lib/es5.d.ts#L867">this</a>in to es5.d.ts<br>
<strong>Expected behavior:</strong><br>
No error<br>
<strong>Actual behavior:</strong><br>
Duplicate Identifier with the same property defined in "node.d.ts"</p>