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
But for my specific case, I would like to have abstract methods in Parent, so I'm making Parent class abstract itself. But as soon as I make Parent abstract, I get the following errors:
ERROR in WebstormProjects/untitled1/src/App.vue
13:3 Argument of type '{ components: { HelloWorld: typeof HelloWorld; }; }' is not assignable to parameter of type 'VueClass<Vue>'.
Object literal may only specify known properties, but 'components' does not exist in type 'VueClass<Vue>'. Did you mean to write 'component'?
11 |
12 | @Component({
> 13 | components: {
| ^
14 | HelloWorld,
15 | },
16 | })
ERROR in WebstormProjects/untitled1/src/components/HelloWorld.vue
11:1 Unable to resolve signature of class decorator when called as an expression.
Type '<VC extends VueClass<Vue>>(target: VC) => VC' is not assignable to type 'typeof HelloWorld'.
Type '<VC extends VueClass<Vue>>(target: VC) => VC' provides no match for the signature 'new (): HelloWorld'.
9 | import Parent from '@/components/Parent';
10 |
> 11 | @Component
| ^
12 | export default class HelloWorld extends Mixins(Parent) {
13 | @Prop() private msg!: string;
14 | }
ERROR in WebstormProjects/untitled1/src/components/HelloWorld.vue
12:48 Argument of type 'typeof Parent' is not assignable to parameter of type 'VueClass<Parent>'.
Type 'typeof Parent' is not assignable to type 'new (...args: any[]) => Parent & Vue'.
Cannot assign an abstract constructor type to a non-abstract constructor type.
10 |
11 | @Component
> 12 | export default class HelloWorld extends Mixins(Parent) {
| ^
13 | @Prop() private msg!: string;
14 | }
15 | </script>
ERROR in WebstormProjects/untitled1/src/components/Parent.ts
3:1 Unable to resolve signature of class decorator when called as an expression.
Type '<VC extends VueClass<Vue>>(target: VC) => VC' is missing the following properties from type 'typeof Parent': extend, nextTick, set, delete, and 9 more.
1 | import { Component, Vue } from 'vue-property-decorator';
2 |
> 3 | @Component
| ^
4 | export default abstract class Parent extends Vue {
5 | public value: string = '';
6 | }
Does it mean I cannot make my Mixin abstract?
The text was updated successfully, but these errors were encountered:
My HelloWorld component is using Parent as a Mixin:
App.vue:
HelloWorld.vue:
Parent.ts
Everything is working fine.
But for my specific case, I would like to have abstract methods in Parent, so I'm making Parent class abstract itself. But as soon as I make Parent abstract, I get the following errors:
Does it mean I cannot make my Mixin abstract?
The text was updated successfully, but these errors were encountered: