chore(core,composables): update jsdocs

This commit is contained in:
braks
2024-02-05 07:51:12 +01:00
committed by Braks
parent 6e162d5f02
commit 2ca5bd82a4
8 changed files with 36 additions and 23 deletions
+5 -2
View File
@@ -5,11 +5,14 @@ import { EdgeId, EdgeRef } from '../context'
import { useVueFlow } from './useVueFlow'
/**
* Access an edge
* This composable provides access to an edge object and it's dom element
*
* If no edge id is provided, the edge id is injected from context
*
* 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
* 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
*
* @param id - The id of the edge to access
* @returns the edge id, the edge and the edge dom element
*/
export function useEdge<Data = ElementData, CustomEvents extends Record<string, CustomEvent> = any>(id?: string) {
const edgeId = id ?? inject(EdgeId, '')