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
Mixin abstract class: union of abstract propeties is not abstract. #39752
Expected behavior:
Union of abstract propeties is abstract property.
Actual behavior:
Union of abstract propeties is not abstract.
Related Issues:
Code
typeConstructor=new(...args: any[])=>{};classBaseClass{}functionAB<TBaseextendsConstructor>(Base: TBase){abstractclassABextendsBase{abstracta: numberabstractb: number};returnAB}functionAC<TBaseextendsConstructor>(Base: TBase){abstractclassACextendsBase{abstracta: numberabstractc: number};returnAC}// should throw "Non-abstract class 'ShouldHavePropA' does not implement inherited abstract member 'a' from class ..."classShouldHavePropAextendsAB(AC(BaseClass)){b=1;c=2;}
Activity
TechQuery commentedon Sep 7, 2022
At 2022, with TypeScript 4.8.2, this kind of codes:
will emit a declaration file as below:
which can't hint library users to implement required properties.
PS: the playground