<p dir="auto">For:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class Foo&lt;T&gt; {

}

let x = new Foo();

type Y = Foo&lt;string&gt;;

let y = new Y();"><pre class="notranslate"><code class="notranslate">class Foo&lt;T&gt; {

}

let x = new Foo();

type Y = Foo&lt;string&gt;;

let y = new Y();
</code></pre></div>
<p dir="auto">tsc complains:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test.ts(9,13): error TS2304: Cannot find name 'Y'."><pre class="notranslate"><code class="notranslate">test.ts(9,13): error TS2304: Cannot find name 'Y'.
</code></pre></div>
<p dir="auto">I would expect the code to be valid. If it were not valid - for which ever reason - then it should be line 7 which it complains about.<br>
Btw. Seems to make no difference, whether i assign T to a literal type like string, or another class.<br>
Of course, as workaround this also works:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class Y extends Foo&lt;string&gt; {};"><pre class="notranslate"><code class="notranslate">class Y extends Foo&lt;string&gt; {};
</code></pre></div>
<p dir="auto">However, this generates unnecessary runtime code. (e.g. ES5):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var __extends = (this &amp;&amp; this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Foo = (function () {
    function Foo() {
    }
    return Foo;
}());
var x = new Foo();
var Y = (function (_super) {
    __extends(Y, _super);
    function Y() {
        _super.apply(this, arguments);
    }
    return Y;
}(Foo));
;
var y = new Y();"><pre class="notranslate"><code class="notranslate">var __extends = (this &amp;&amp; this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Foo = (function () {
    function Foo() {
    }
    return Foo;
}());
var x = new Foo();
var Y = (function (_super) {
    __extends(Y, _super);
    function Y() {
        _super.apply(this, arguments);
    }
    return Y;
}(Foo));
;
var y = new Y();
</code></pre></div>
<p dir="auto">Not sure, whether it would be valid to treat empty subclasses like an alias instead of prototypic inheritance.<br>
Also interesting the free floating semi-colon right at the end.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ tsc -v
Version 1.8.2"><pre class="notranslate"><code class="notranslate">$ tsc -v
Version 1.8.2
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class A {}
type B = A;
var b = new B(); // &lt;--- Cannot find name 'B'."><pre lang="'" class="notranslate"><code class="notranslate">class A {}
type B = A;
var b = new B(); // &lt;--- Cannot find name 'B'.
</code></pre></div>