Skip to Content
参考手册类型

OnBeforeDelete

GitHub 上的源代码 

¥Source on GitHub 

OnBeforeDelete 类型定义了在删除节点或边之前调用的回调函数。此回调接收一个包含即将被删除的节点和边的对象。

¥The OnBeforeDelete type defines the callback function that is called before nodes or edges are deleted. This callback receives an object containing the nodes and edges that are about to be deleted.

type OnBeforeDelete = (params: { nodes: Node[]; edges: Edge[]; }) => Promise<boolean | { nodes: Node[]; edges: Edge[]; })>;
Parameters:
NameTypeDefault
__0{ nodes: NodeType[]; edges: EdgeType[]; }
Returns:
Promise<boolean | { nodes: NodeType[]; edges: EdgeType[]; }>
Last updated on