diff --git a/packages/react/src/types/edges.ts b/packages/react/src/types/edges.ts index 76690161..b85612f9 100644 --- a/packages/react/src/types/edges.ts +++ b/packages/react/src/types/edges.ts @@ -60,7 +60,9 @@ type StepEdge = Record pathOptions?: StepPathOptions; }; -export type BuiltInEdge = SmoothStepEdge | BezierEdge | StepEdge; +type StraightEdge = Record> = Edge; + +export type BuiltInEdge = SmoothStepEdge | BezierEdge | StepEdge | StraightEdge; export type EdgeMouseHandler = (event: ReactMouseEvent, edge: EdgeType) => void; diff --git a/packages/svelte/src/lib/types/edges.ts b/packages/svelte/src/lib/types/edges.ts index b9700292..de1def91 100644 --- a/packages/svelte/src/lib/types/edges.ts +++ b/packages/svelte/src/lib/types/edges.ts @@ -44,7 +44,12 @@ type StepEdge = Record pathOptions?: StepPathOptions; }; -export type BuiltInEdge = SmoothStepEdge | BezierEdge | StepEdge; +type StraightEdge = Record> = Edge< + EdgeData, + 'straight' +>; + +export type BuiltInEdge = SmoothStepEdge | BezierEdge | StepEdge | StraightEdge; /** * Custom edge component props.