1. 程式人生 > >Vue+typescript報錯項

Vue+typescript報錯項

39: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 HelloWorld': extend, nextTick, set, delete, and 7 more.
    37 | import { Component, Prop, Vue } from 'vue-property-decorator';
    38 |
  > 39 | @Component
       | ^
    40 | export default class HelloWorld extends Vue {
    41 |     @Prop() private msg!: string;
    42 | }
No lint errors found

  處理方案 :配置tsconfig.json

"strictFunctionTypes": false