I'm starting to learn typescript & Vuejs.
Can anyone explain me why I can't access the account property in data from the computed allChecked()?
import * as Vue from "vue";
declare var accounts: any[];
var app = new Vue({
el: '#vueowner',
data: {
accounts: accounts,
hasAccount: this.accounts.length > 0,
checkedAccounts: []
},
computed: {
allChecked() {
return this.accounts.length === this.checkedAccounts.length;
}
}
})
I have this errors
ERROR in index.ts
(25,25): error TS2339: Property 'accounts' does not exist on type 'Vue'.
ERROR in index.ts
(25,50): error TS2339: Property 'checkedAccounts' does not exist on type 'Vue'.