I have a Vue 2 component with TypeScript:
import Vue from 'vue';
import Component from 'vue-class-component';
import Prop from 'vue-property-decorator';
@Component({
template: require('./template.html'),
})
export class SuklTableApprComponent extends Vue {
@Prop()
type: any;
@Prop()
data: any;
mounted() {}
}
Despite following the documentation, I am facing an issue where TypeScript is not recognizing the @Prop decorator. It shows the following error message:
TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof "/home/tomasturan/programming/sukl/reg-dis-forms-v2/node_modules/vue-property-decorator/li...' has no compatible call signatures.
Can someone explain why this error is happening? I have another project with similar setup where everything works fine. What could be causing this error?