I am facing an issue when transitioning from using Vuex in JavaScript to TypeScript. The error message Property 'commit' does not exist
appears in Vuex's mutations:
const mutations = {
methodA (): none {
this.commit('methodB') // raise error here!!! <- Property 'commit' does not exist on type '...'
},
methodB (): nont {
log.console('hello')
}
}
Any suggestions on how to resolve this problem?
EDIT:
Still waiting... www
EDIT:
Below is a snippet of the entire file, which may be lengthy (200 lines):
import fs from 'fs'
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'
import { remote } from 'electron'
// Rest of the code...
Additional information: This project utilizes electron
, and I am attempting to convert it into a TypeScript file. The specific file in question is a Vue store file located at ./src/store/modules/todolist.vue
.