<p dir="auto">I've defined two interfaces: (<a href="http://www.typescriptlang.org/Playground#src=interface%20BaseNode%20%7B%20next%3F%3A%20this%3B%20%7D%0Ainterface%20SomeNode%20extends%20BaseNode%20%7B%20a%3A%20number%3B%20%7D%0A%0Avar%20node%3A%20SomeNode%20%3D%20%7Ba%3A%201%2C%20next%3A%20%7Ba%3A%202%2C%20next%3A%20%7Ba%3A%203%7D%7D%7D%0Avar%20arr%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Awhile%20%28node%29%20%7B%0A%09arr%5Bi%5D%20%3D%20node%3B%0A%09i%2B%2B%3B%0A%09node%20%3D%20node.next%3B%20%2F%2F%20As%20expected%20%28no%20errors%29%20%0A%7D%0Aconsole.log%28arr%29%3B%0A%0Afunction%20toArray%3CT%20extends%20BaseNode%3E%28node%3A%20T%29%3A%20Array%3CT%3E%20%7B%0A%09var%20arr%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0A%09while%20%28node%29%20%7B%0A%09%09arr%5Bi%5D%20%3D%20node%3B%0A%09%09i%2B%2B%3B%0A%09%09node%20%3D%20node.next%3B%20%2F%2F%20Error%3A%20Type%20'BaseNode'%20is%20not%20assignable%20to%20type%20'T'%0A%09%7D%0A%09return%20arr%3B%0A%7D" rel="nofollow">this is synthetic example</a>)</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface BaseNode { next?: this; }
interface SomeNode extends BaseNode { a: number; }"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">BaseNode</span> <span class="pl-kos">{</span> <span class="pl-c1">next</span>?: this<span class="pl-kos">;</span> <span class="pl-kos">}</span>
<span class="pl-k">interface</span> <span class="pl-smi">SomeNode</span> <span class="pl-k">extends</span> <span class="pl-smi">BaseNode</span> <span class="pl-kos">{</span> <span class="pl-c1">a</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div>
<p dir="auto">then if i write something like</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var node: SomeNode = {a: 1, next: {a: 2, next: {a: 3}}};
var arr = [], i = 0;
while (node) {
    arr[i] = node;
    i++;
    node = node.next; // As expected (no errors) 
}
console.log(arr)"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">node</span>: <span class="pl-smi">SomeNode</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-c1">a</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">next</span>: <span class="pl-kos">{</span><span class="pl-c1">a</span>: <span class="pl-c1">2</span><span class="pl-kos">,</span> <span class="pl-c1">next</span>: <span class="pl-kos">{</span><span class="pl-c1">a</span>: <span class="pl-c1">3</span><span class="pl-kos">}</span><span class="pl-kos">}</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">arr</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">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span>
<span class="pl-k">while</span> <span class="pl-kos">(</span><span class="pl-s1">node</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">node</span><span class="pl-kos">;</span>
    <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">;</span>
    <span class="pl-s1">node</span> <span class="pl-c1">=</span> <span class="pl-s1">node</span><span class="pl-kos">.</span><span class="pl-c1">next</span><span class="pl-kos">;</span> <span class="pl-c">// As expected (no errors) </span>
<span class="pl-kos">}</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">then all compiles like a charm. On the other side when I'm trying to write a function that does the same and has the correct signature, I'm getting an error:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function toArray&lt;T extends BaseNode&gt;(node: T): Array&lt;T&gt; {
    var arr = [], i = 0;
    while (node) {
        arr[i] = node;
        i++;
        node = node.next; // Error: Type 'BaseNode' is not assignable to type 'T'
    }
    return arr;
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">toArray</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">BaseNode</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">node</span>: <span class="pl-smi">T</span><span class="pl-kos">)</span>: <span class="pl-smi">Array</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">var</span> <span class="pl-s1">arr</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">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span>
    <span class="pl-k">while</span> <span class="pl-kos">(</span><span class="pl-s1">node</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">node</span><span class="pl-kos">;</span>
        <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">;</span>
        <span class="pl-s1">node</span> <span class="pl-c1">=</span> <span class="pl-s1">node</span><span class="pl-kos">.</span><span class="pl-c1">next</span><span class="pl-kos">;</span> <span class="pl-c">// Error: Type 'BaseNode' is not assignable to type 'T'</span>
    <span class="pl-kos">}</span>
    <span class="pl-k">return</span> <span class="pl-s1">arr</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Should it compile without any errors?</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class A {
    self(): this {
        return this;
    }
}

class T extends A {}

var t: T = new T().self(); // Here is fine.

class B&lt;T extends A&gt; {
    a: T;
    test(): T {
        return this.a.self(); // Here got error: &quot;Type 'A' is not assignable to type 'T'&quot;.
    }
}
"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>
    <span class="pl-en">self</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">T</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">var</span> <span class="pl-s1">t</span>: <span class="pl-smi">T</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">T</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">self</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Here is fine.</span>

<span class="pl-k">class</span> <span class="pl-smi">B</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">A</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-c1">a</span>: <span class="pl-smi">T</span><span class="pl-kos">;</span>
    <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">T</span> <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-c1">a</span><span class="pl-kos">.</span><span class="pl-en">self</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Here got error: "Type 'A' is not assignable to type 'T'".</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>