[Vuejs]-Typescript can't see this type with vue.js

0👍

For those who are struggling with the same issue: I switched to https://github.com/vuejs/vue-class-component and it started to work properly.

For example the code I posted, will look like this with vue-class-component:

import Vue from "vue";
import Component from 'vue-class-component';

@Component({})
class Example extends Vue {
    msg = "Hello";
    greet(): void {
      this.msg = "asdasd"; //This is a proper here.
      return this.msg + ' world';
    }
}

Leave a comment