-
Notifications
You must be signed in to change notification settings - Fork 434
v7.2.4 breaks "Mixins" decorator usage #435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Opened different issue kaorun343/vue-property-decorator#335 |
Yes. I had encountered this issue. class A extends Mixins(B) {
get a () {
// This will come up an issue that `b` is nonexistent in `A`
return this.b;
}
}
class B extends Mixins(C) {
b!: number;
}
class C extend Vue {} I think this may be an issue about the declarition type for export declare function mixins<A, B>(CtorA: VueClass<A>, CtorB: VueClass<B>): VueClass<A & B>; But now using the export declare type MixedVueClass<Mixins extends VueClass<Vue>[]> = Mixins extends (infer T)[] ? VueClass<UnionToIntersection<ExtractInstance<T>>> : never;
export declare function mixins<T extends VueClass<Vue>[]>(...Ctors: T): MixedVueClass<T>; I just recognized by my |
This will not encountered in |
After upgrading from
v7.2.3
tov7.2.4
I'm getting a lot of different TypeScript compilation errors because of usingMixins
decorator as generics. Something likeType 'MixinName<Data>' does not satisfy the constraint 'VueClass<Vue>[]'.
I'm using mixins like that
It looks like breaking changes has been introduced in
v7.2.4
, but I have no idea what wrong exactly.v7.2.3
works perfectly.The text was updated successfully, but these errors were encountered: