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
declare class Super {
set(property:string, value:any);
}
declare class SubA extends Super {
set(property:"name", value:string);
set(property:string, value:any); // don't know why this is needed, as it should be inherited
}
declare class SubB extends Super {
set(property:"size", value:number);
set(property:string, value:any); // okay, I repeat myself.
}
interface Both extends SubA, SubB {
}
Gives me:
Error:(16, 15) TS2320: Interface 'Both' cannot simultaneously extend types 'SubA' and 'SubB'.
Named properties 'set' of types 'SubA' and 'SubB' are not identical.
I'm working with Dojo, where SubA and SubB are two Widgets and Both is the type of a mixin.
Ironically, this prevents the error:
interface Both extends SubA, SubB {
set(property:string, value:any);
}