@@ -2,7 +2,6 @@ import type { CSSProperties, ComputedRef, ToRefs } from 'vue'
2
2
import type { KeyFilter } from '@vueuse/core'
3
3
import type {
4
4
Dimensions ,
5
- ElementData ,
6
5
Elements ,
7
6
FlowElements ,
8
7
FlowExportObject ,
@@ -25,7 +24,7 @@ import type {
25
24
import type { DefaultEdgeOptions , Edge , EdgeUpdatable , GraphEdge } from './edge'
26
25
import type { CoordinateExtent , CoordinateExtentRange , GraphNode , Node } from './node'
27
26
import 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'
29
28
import type { EdgeChange , NodeChange , NodeDragItem } from './changes'
30
29
import type { ConnectingHandle , ValidConnectionFunc } from './handle'
31
30
@@ -182,13 +181,9 @@ export type UpdateNodeDimensions = (updates: UpdateNodeDimensionsParams[]) => vo
182
181
183
182
export type UpdateNodeInternals = ( nodeIds ?: string [ ] ) => void
184
183
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
188
185
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
192
187
193
188
export type GetIntersectingNodes = (
194
189
node : ( Partial < Node > & { id : Node [ 'id' ] } ) | Rect ,
0 commit comments