chore(types): add tsdocs

This commit is contained in:
moklick
2025-02-11 17:57:21 +01:00
parent 7b0f96f017
commit 381ed2a5bf
34 changed files with 264 additions and 100 deletions
@@ -6,8 +6,8 @@ import type { BaseEdgeProps } from '../../types';
/**
* The `<BaseEdge />` component gets used internally for all the edges. It can be
*used inside a custom edge and handles the invisible helper edge and the edge label
*for you.
* used inside a custom edge and handles the invisible helper edge and the edge label
* for you.
*
* @public
* @example
@@ -27,9 +27,9 @@ import type { BaseEdgeProps } from '../../types';
*```
*
* @remarks If you want to use an edge marker with the [`<BaseEdge />`](/api-reference/components/base-edge) component,
*you can pass the `markerStart` or `markerEnd` props passed to your custom edge
*through to the [`<BaseEdge />`](/api-reference/components/base-edge) component. You can see all the props
*passed to a custom edge by looking at the [`EdgeProps`](/api-reference/types/edge-props) type.
* you can pass the `markerStart` or `markerEnd` props passed to your custom edge
* through to the [`<BaseEdge />`](/api-reference/components/base-edge) component.
* You can see all the props passed to a custom edge by looking at the [`EdgeProps`](/api-reference/types/edge-props) type.
*/
export function BaseEdge({
path,
@@ -75,7 +75,7 @@ EdgeTextComponent.displayName = 'EdgeText';
/**
* You can use the `<EdgeText />` component as a helper component to display text
*within your custom edges.
* within your custom edges.
*
*@public
*
@@ -31,8 +31,8 @@ function getControl({ pos, x1, y1, x2, y2 }: GetControlParams): [number, number]
/**
* The `getSimpleBezierPath` util returns everything you need to render a simple
*bezier edge between two nodes.
* @public
* bezier edge between two nodes.
* @public
*/
export function getSimpleBezierPath({
sourceX,