JSFiddle - React, Tailwind, and code Playground
by ktsn
HTML
<script src="https://unpkg.com/vue"></script>
JavaScript
const vm = new Vue({
name: "HelloWorld",
props: {
msg: String
},
data() {
return {
wtf: this.initData(), // throw ts error : Property 'initData' does not exist on type 'CombinedVueInstance<Vue, {}, {}, {}, Readonly<{ msg: string; }>>'.
}
},
methods: {
initData() {
return {
a: ''
}
},
},
});
console.log(vm.wtf)