Merge pull request #5167 from dimaMachina/tsdoc2-13

Improve TSDoc comments for `useEdges`, `useInternalNode`, `useNodes` and `useNodeId` hooks
This commit is contained in:
Moritz Klack
2025-04-06 21:04:00 +02:00
committed by GitHub
5 changed files with 10 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
---
'@xyflow/react': patch
---
Improve TSDoc comments for `useEdges`, `useInternalNode`, `useNodes` and `useNodeId` hooks

View File

@@ -10,7 +10,7 @@ export const Consumer = NodeIdContext.Consumer;
* drill down the id as a prop.
*
* @public
* @returns id of the node
* @returns The id for a node in the flow.
*
* @example
*```jsx

View File

@@ -10,7 +10,7 @@ const edgesSelector = (state: ReactFlowState) => state.edges;
* will re-render **whenever any edge changes**.
*
* @public
* @returns An array of edges
* @returns An array of all edges currently in the flow.
*
* @example
* ```tsx

View File

@@ -10,8 +10,8 @@ import type { InternalNode, Node } from '../types';
* including when a node is selected or moved.
*
* @public
* @param id - id of the node
* @returns array with visible node ids
* @param id - The ID of a node you want to observe.
* @returns The `InternalNode` object for the node with the given ID.
*
* @example
* ```tsx

View File

@@ -11,7 +11,7 @@ const nodesSelector = (state: ReactFlowState) => state.nodes;
* or moved.
*
* @public
* @returns An array of nodes
* @returns An array of all nodes currently in the flow.
*
* @example
* ```jsx