fix(types): shims overwriting component internal instance type
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Vendored
-8
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user