Error > The class method 'data' should use 'this' but it is not.
I encountered this issue and believed I fixed it as shown below: TypeScript Unexpected token, A constructor, method, accessor or property was expected
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import { MOON_HOLDINGS_LINK, TWITTER_LINK } from '@/constants/links'
@Component
export default class HelloWorld extends Vue {
@Prop() private title!: string
data(): any {
return {
moonLink: MOON_HOLDINGS_LINK,
}
}
}
</script>