chore(tsdocs): cleanup

This commit is contained in:
moklick
2025-02-12 14:29:20 +01:00
parent a541799654
commit c3dc6d3851
+7 -6
View File
@@ -55,7 +55,7 @@ export const isInternalNodeBase = <NodeType extends InternalNodeBase = InternalN
/** /**
* This util is used to tell you what nodes, if any, are connected to the given node * This util is used to tell you what nodes, if any, are connected to the given node
*as the _target_ of an edge. * as the _target_ of an edge.
* @public * @public
* @param node - The node to get the connected nodes from * @param node - The node to get the connected nodes from
* @param nodes - The array of all nodes * @param nodes - The array of all nodes
@@ -97,7 +97,7 @@ export const getOutgoers = <NodeType extends NodeBase = NodeBase, EdgeType exten
/** /**
* This util is used to tell you what nodes, if any, are connected to the given node * This util is used to tell you what nodes, if any, are connected to the given node
*as the _source_ of an edge. * as the _source_ of an edge.
* @public * @public
* @param node - The node to get the connected nodes from * @param node - The node to get the connected nodes from
* @param nodes - The array of all nodes * @param nodes - The array of all nodes
@@ -155,8 +155,8 @@ export type GetNodesBoundsParams<NodeType extends NodeBase = NodeBase> = {
/** /**
* Returns the bounding box that contains all the given nodes in an array. This can * Returns the bounding box that contains all the given nodes in an array. This can
*be useful when combined with [`getViewportForBounds`](/api-reference/utils/get-viewport-for-bounds) * be useful when combined with [`getViewportForBounds`](/api-reference/utils/get-viewport-for-bounds)
*to calculate the correct transform to fit the given nodes in a viewport. * to calculate the correct transform to fit the given nodes in a viewport.
* @public * @public
* @remarks Useful when combined with {@link getViewportForBounds} to calculate the correct transform to fit the given nodes in a viewport. * @remarks Useful when combined with {@link getViewportForBounds} to calculate the correct transform to fit the given nodes in a viewport.
* @param nodes - Nodes to calculate the bounds for * @param nodes - Nodes to calculate the bounds for
@@ -296,7 +296,8 @@ export const getNodesInside = <NodeType extends NodeBase = NodeBase>(
}; };
/** /**
* This utility filters an array of edges, keeping only those where either the source or target node is present in the given array of nodes. * This utility filters an array of edges, keeping only those where either the source or target
* node is present in the given array of nodes.
* @public * @public
* @param nodes - Nodes you want to get the connected edges for * @param nodes - Nodes you want to get the connected edges for
* @param edges - All edges * @param edges - All edges
@@ -461,7 +462,7 @@ export async function getElementsToRemove<NodeType extends NodeBase = NodeBase,
}): Promise<{ }): Promise<{
nodes: NodeType[]; nodes: NodeType[];
edges: EdgeType[]; edges: EdgeType[];
}> { }> {
const nodeIds = new Set(nodesToRemove.map((node) => node.id)); const nodeIds = new Set(nodesToRemove.map((node) => node.id));
const matchingNodes: NodeType[] = []; const matchingNodes: NodeType[] = [];