From 09a14e809f0fd1dce66842f2ce58239338d2dcc4 Mon Sep 17 00:00:00 2001 From: TA31OU Date: Thu, 18 Sep 2025 09:03:50 +0200 Subject: [PATCH] Clean up type Signed-off-by: TA31OU --- .../src/components/DependencyGraph/types.ts | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/packages/core-components/src/components/DependencyGraph/types.ts b/packages/core-components/src/components/DependencyGraph/types.ts index 2629d9fda1..d3e51db85b 100644 --- a/packages/core-components/src/components/DependencyGraph/types.ts +++ b/packages/core-components/src/components/DependencyGraph/types.ts @@ -99,17 +99,7 @@ export namespace DependencyGraphTypes { * * @public */ - export type RenderEdgeProps = { - edge: DependencyEdge; - id: dagre.Edge; - }; - - /** - * Custom React component for graph {@link DependencyGraphTypes.DependencyEdge} - * - * @public - */ - export type RenderEdgeFunction = (props: { + export type RenderEdgeProps = { edge: T & { points: { x: number; y: number }[]; label?: string; @@ -124,8 +114,17 @@ export namespace DependencyGraphTypes { to?: string; relations?: string[]; }; - id: { v: string; w: string }; - }) => ReactNode; + id: dagre.Edge; + }; + + /** + * Custom React component for graph {@link DependencyGraphTypes.DependencyEdge} + * + * @public + */ + export type RenderEdgeFunction = ( + props: RenderEdgeProps, + ) => ReactNode; /** * Graph direction