@@ -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 , 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 { StartHandle , ValidConnectionFunc , ValidHandleResult } from './handle'
31
30
@@ -177,13 +176,9 @@ export type UpdateNodeDimensions = (updates: UpdateNodeDimensionsParams[]) => vo
177
176
178
177
export type UpdateNodeInternals = ( nodeIds ?: string [ ] ) => void
179
178
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
183
180
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
187
182
188
183
export type GetIntersectingNodes = (
189
184
node : ( Partial < Node > & { id : Node [ 'id' ] } ) | Rect ,
0 commit comments