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
classPerson{constructor(publicname: string){}protectedmyProtectedFunction(){// do something}}typeConstructor<T>=new(...args: any[])=>T;functionPersonMixin<TextendsConstructor<Person>>(Base: T){returnclassextendsBase{constructor(...args: any[]){super(...args);}myProtectedFunction(){super.myProtectedFunction();// do more things}};}classCustomerextendsPersonMixin(Person){accountBalance: number;}
Expected behavior:
No compilation errors
Actual behavior:
Errors with:
src/test.ts|24 col 7 error| Class 'Customer' incorrectly extends base class 'PersonMixin<typeof Person>.(Anonymous class) & Person'. Type 'Customer' is not assignable to type 'Person'. Property 'myProtectedFunction' is protected but type 'Customer' is not a class derived from 'Person'.
The text was updated successfully, but these errors were encountered:
TypeScript Version: RC (2.2.0)
Code
Expected behavior:
No compilation errors
Actual behavior:
Errors with:
src/test.ts|24 col 7 error| Class 'Customer' incorrectly extends base class 'PersonMixin<typeof Person>.(Anonymous class) & Person'. Type 'Customer' is not assignable to type 'Person'. Property 'myProtectedFunction' is protected but type 'Customer' is not a class derived from 'Person'.
The text was updated successfully, but these errors were encountered: