Closed
Description
I created new vue with typescript application using latest @vue/cli (v3).
When I use component decorator from vue-class-component
with computed
/props
/methods
, I got an error:
Property 'count' does not exist on type 'HelloWorld'.Vetur(2339)
Here my code:
<script lang="ts">
import { Prop, Vue } from "vue-property-decorator";
import Component from "vue-class-component";
@Component({
computed: {
count() {
return 'blabla';
}
}
})
export default class HelloWorld extends Vue {
@Prop() private msg!: string;
onClick() {
const y = this.count;
}
}
</script>
But according to the example it should be working fine. How do I fix this?
Metadata
Metadata
Assignees
Labels
No labels