fix(types): shims overwriting component internal instance type

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 5139b0786b
commit 25b64fe3a7
2 changed files with 1 additions and 9 deletions
+1 -1
View File
@@ -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
-8
View File
@@ -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
}
}