refactor(core): add explicit imports and remove auto-imports

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-05-25 20:48:26 +02:00
committed by Braks
parent 5a86c7cf1d
commit e3e6a03359
63 changed files with 328 additions and 508 deletions
+5 -2
View File
@@ -1,5 +1,8 @@
import { inject } from 'vue'
import { useVueFlow } from './useVueFlow'
import type { CustomEvent, ElementData } from '~/types'
import { VueFlowError } from '~/utils/errors'
import { ErrorCode, VueFlowError } from '~/utils'
import { EdgeId, EdgeRef } from '~/context'
/**
* Access an edge
@@ -8,7 +11,7 @@ import { VueFlowError } from '~/utils/errors'
*
* Meaning if you do not provide an id, this composable has to be called in a child of your custom edge component, or it will throw
*/
export default function useEdge<Data = ElementData, CustomEvents extends Record<string, CustomEvent> = any>(id?: string) {
export function useEdge<Data = ElementData, CustomEvents extends Record<string, CustomEvent> = any>(id?: string) {
const edgeId = id ?? inject(EdgeId, '')
const edgeEl = inject(EdgeRef, null)