[Vuejs]-Property not exist on type – vue with typescript

5👍

To get types inference try to wrap your options with Vue.extend({}) :

<script lang="ts">
import Vue from 'vue'  
export default Vue.extend({
data() {
    return {
      isShow: false as boolean
    }
  }
  methods: {
    openCalendar() : void {
      this.isShow = true;
    },
 },
})
</script>

Leave a comment