diff --git a/src/composables/useVueFlow.ts b/src/composables/useVueFlow.ts index 8f5d2855..407ca418 100644 --- a/src/composables/useVueFlow.ts +++ b/src/composables/useVueFlow.ts @@ -5,7 +5,7 @@ import { useStore } from '~/store' let id = 0 export default (options?: FlowOptions): UseVueFlow => { - const currentInstance = getCurrentInstance() + const currentInstance: any = getCurrentInstance() let vueFlow: UseVueFlow | false | undefined = currentInstance ? inject(VueFlow, undefined) ?? (currentInstance.vueFlow as UseVueFlow) : false diff --git a/src/shims-vue.d.ts b/src/shims-vue.d.ts index 7ed080c8..a191098d 100644 --- a/src/shims-vue.d.ts +++ b/src/shims-vue.d.ts @@ -1,14 +1,6 @@ -import { UseVueFlow } from '~/types' - declare module '*.vue' { import { DefineComponent } from 'vue' // eslint-disable-next-line @typescript-eslint/ban-types const component: DefineComponent<{}, {}, any> export default component } - -declare module '@vue/runtime-core' { - interface ComponentInternalInstance { - vueFlow: UseVueFlow - } -}