chore(onbeforedelete): use correct node/edge types, pass generic

This commit is contained in:
moklick
2024-01-23 13:04:02 +01:00
parent 6c73ab9a45
commit 2e1bfc35c0
9 changed files with 23 additions and 9 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ import {
NodeDragItem,
CoordinateExtent,
OnError,
OnBeforeDelete,
OnBeforeDeleteBase,
} from '../types';
import { errorMessages } from '../constants';
@@ -347,7 +347,7 @@ export async function getElementsToRemove<NodeType extends NodeBase = NodeBase,
edgesToRemove: Partial<EdgeType>[];
nodes: NodeType[];
edges: EdgeType[];
onBeforeDelete?: OnBeforeDelete;
onBeforeDelete?: OnBeforeDeleteBase<NodeType, EdgeType>;
}): Promise<{
nodes: NodeType[];
edges: EdgeType[];