From 95dfd1d6deef2a3ac29d800e73baeab8d8ec7915 Mon Sep 17 00:00:00 2001
From: Peter
Date: Tue, 5 Dec 2023 13:46:59 +0100
Subject: [PATCH] Finished TSDocs for util functions in React
---
packages/react/src/utils/general.ts | 8 ++++++++
packages/system/src/utils/edges/general.ts | 6 +++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/packages/react/src/utils/general.ts b/packages/react/src/utils/general.ts
index af5443cd..aa96ff92 100644
--- a/packages/react/src/utils/general.ts
+++ b/packages/react/src/utils/general.ts
@@ -58,6 +58,14 @@ export const getIncomers = getIncomersBase;
*/
export const addEdge = addEdgeBase;
+/**
+ * A handy utility to update an existing Edge with new properties
+ * @param oldEdge - The edge you want to update
+ * @param newConnection - The new connection you want to update the edge with
+ * @param edges - The array of all current edges
+ * @param options.shouldReplaceId - should the id of the old edge be replaced with the new connection id
+ * @returns the updated edges array
+ */
export const updateEdge = updateEdgeBase;
/**
diff --git a/packages/system/src/utils/edges/general.ts b/packages/system/src/utils/edges/general.ts
index 42baa0dc..bfadb743 100644
--- a/packages/system/src/utils/edges/general.ts
+++ b/packages/system/src/utils/edges/general.ts
@@ -174,10 +174,10 @@ export type UpdateEdgeOptions = {
/**
* A handy utility to update an existing Edge with new properties
* @param oldEdge - The edge you want to update
- * @param newConnection - The new Connection you want to update the edge with
+ * @param newConnection - The new connection you want to update the edge with
* @param edges - The array of all current edges
- * @param options.shouldReplaceId -
- * @returns
+ * @param options.shouldReplaceId - should the id of the old edge be replaced with the new connection id
+ * @returns the updated edges array
*/
export const updateEdgeBase = (
oldEdge: EdgeType,