@@ -2,7 +2,6 @@ import type { CSSProperties, ComputedRef, ToRefs } from 'vue'
22import type { KeyFilter } from '@vueuse/core'
33import type {
44 Dimensions ,
5- ElementData ,
65 Elements ,
76 FlowElements ,
87 FlowExportObject ,
@@ -25,7 +24,7 @@ import type {
2524import type { DefaultEdgeOptions , Edge , EdgeUpdatable , GraphEdge } from './edge'
2625import type { CoordinateExtent , GraphNode , Node } from './node'
2726import type { D3Selection , D3Zoom , D3ZoomHandler , PanOnScrollMode , ViewportFunctions , ViewportTransform } from './zoom'
28- import type { CustomEvent , FlowHooks , FlowHooksEmit , FlowHooksOn } from './hooks'
27+ import type { FlowHooks , FlowHooksEmit , FlowHooksOn } from './hooks'
2928import type { EdgeChange , NodeChange , NodeDragItem } from './changes'
3029import type { StartHandle , ValidConnectionFunc , ValidHandleResult } from './handle'
3130
@@ -177,13 +176,9 @@ export type UpdateNodeDimensions = (updates: UpdateNodeDimensionsParams[]) => vo
177176
178177export type UpdateNodeInternals = ( nodeIds ?: string [ ] ) => void
179178
180- export type FindNode = < Data = ElementData , CustomEvents extends Record < string , CustomEvent > = any > (
181- id : string ,
182- ) => GraphNode < Data , CustomEvents > | undefined
179+ export type FindNode = < T extends GraphNode = GraphNode > ( id : string ) => T | undefined
183180
184- export type FindEdge = < Data = ElementData , CustomEvents extends Record < string , CustomEvent > = any > (
185- id : string ,
186- ) => GraphEdge < Data , CustomEvents > | undefined
181+ export type FindEdge = < T extends GraphEdge = GraphEdge > ( id : string ) => T | undefined
187182
188183export type GetIntersectingNodes = (
189184 node : ( Partial < Node > & { id : Node [ 'id' ] } ) | Rect ,
0 commit comments