You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
class doesn't inherit generic type paramater when inheriting from a variable/expression #64116
If I instantiate the derived B class directly, an error is reported, but not for the derived class. And if I remove the default generic type parameter from Component. A "Generic type 'Component' requires 1 type argument(s)." error will be reported on extends B. But this isn't reported in TypeScript 6 and TypeScript 7.0.2.
🙂 Expected behavior
Derived class retaining the generic type parameter.
typescript@7.1.0-dev.20260722.1 — only new B().$on('foo3', …) errors; new C().$on('foo3', …) does not (bug)
typescript@7.1.0-dev.20260721.1 — both error as expected
Current main (253c5e20) built tsc shows the same regression
Planning to bisect between the two nightlies and add a testcases regression test. If someone is already working on this, I won't proceed — just let me know.
Activity
scs0209 commentedon Sep 1, 2026
I'd like to work on this.
I reproduced locally:
typescript@7.1.0-dev.20260722.1— onlynew B().$on('foo3', …)errors;new C().$on('foo3', …)does not (bug)typescript@7.1.0-dev.20260721.1— both error as expectedmain(253c5e20) builttscshows the same regressionPlanning to bisect between the two nightlies and add a
testcasesregression test. If someone is already working on this, I won't proceed — just let me know.