@@ -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 , CoordinateExtentRange , 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 { ConnectingHandle , ValidConnectionFunc } from './handle'
3130
@@ -182,13 +181,9 @@ export type UpdateNodeDimensions = (updates: UpdateNodeDimensionsParams[]) => vo
182181
183182export type UpdateNodeInternals = ( nodeIds ?: string [ ] ) => void
184183
185- export type FindNode = < Data = ElementData , CustomEvents extends Record < string , CustomEvent > = any > (
186- id : string | undefined | null ,
187- ) => GraphNode < Data , CustomEvents > | undefined
184+ export type FindNode = < T extends GraphNode = GraphNode > ( id : string | undefined | null ) => T | undefined
188185
189- export type FindEdge = < Data = ElementData , CustomEvents extends Record < string , CustomEvent > = any > (
190- id : string | undefined | null ,
191- ) => GraphEdge < Data , CustomEvents > | undefined
186+ export type FindEdge = < T extends GraphEdge = GraphEdge > ( id : string | undefined | null ) => T | undefined
192187
193188export type GetIntersectingNodes = (
194189 node : ( Partial < Node > & { id : Node [ 'id' ] } ) | Rect ,
0 commit comments