After successfully configuring TypeScript for my Vue 2 project, I encountered a problem with my VueKonva plugin. Upon launching the app, I received the error message below.
I attempted to resolve the issue by adding "vue-konva"
to the types
section in the tsconfig.json
file without success. Additionally, creating a vue-konva.d.js
file did not provide a solution either. Can someone assist me in identifying my mistake?
Failed to compile.
src/main.ts:8:3
TS2769: No overload matches this call.
...
The code from main.ts is shown below:
import Vue from "vue";
import App from "@/App.vue";
import VueKonva from 'vue-konva';
Vue.use(VueKonva);
new Vue({
VueKonva,
render: h => h(App)
}).$mount("#app");
In the tsconfig.json file:
{
"compilerOptions": {
"target": "esnext",
...
],
"types": [
"vue-konva",
"vuetify",
"webpack-env"
],
...
},
"include": [
...
],
"exclude": [
"node_modules"
]
}