I encountered an issue with my Vue.js app using TypeScript. The error message I'm getting is:
Property 'faillogout' does not exist on type '{ failed(): void; onSubmit(): void; }'.
101 | failed () {
This snippet shows the script section of my .vue file
<script lang="ts">
import store from '../store'
export default {
data () {
return {
email: '',
password: '',
faillogout: false
}
},
methods: {
failed () {
if (!store.state.idToken) {
this.faillogout = true
}
},
onSubmit () {
const formData = {
email: this.email,
password: this.password
}
console.log(formData)
store.dispatch('login', {email: formData.email, password: formData.password})
setTimeout(this.failed, 3000)
}
}
}
</script>
If anyone has suggestions on how to resolve this issue, I would greatly appreciate any help.