Closed
Description
interface VueCtor {
new <D = object>(d: D): Vue & D;
}
interface Vue {
}
declare var Vue: VueCtor;
class A extends Vue {
// ~~~
// Error: Base constructor return type 'Vue & D' is not a class or interface type.
}
I thought this might have to do with the constraint, but adding an explicit D extends object = object
doesn't work either.
Is it possible that D
isn't correctly getting instantiated with its default type argument when extending from Vue
?