Finished TSDocs for util functions in React
This commit is contained in:
@@ -58,6 +58,14 @@ export const getIncomers = getIncomersBase<Node, Edge>;
|
|||||||
*/
|
*/
|
||||||
export const addEdge = addEdgeBase<Edge>;
|
export const addEdge = addEdgeBase<Edge>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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<Edge>;
|
export const updateEdge = updateEdgeBase<Edge>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -174,10 +174,10 @@ export type UpdateEdgeOptions = {
|
|||||||
/**
|
/**
|
||||||
* A handy utility to update an existing Edge with new properties
|
* A handy utility to update an existing Edge with new properties
|
||||||
* @param oldEdge - The edge you want to update
|
* @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 edges - The array of all current edges
|
||||||
* @param options.shouldReplaceId -
|
* @param options.shouldReplaceId - should the id of the old edge be replaced with the new connection id
|
||||||
* @returns
|
* @returns the updated edges array
|
||||||
*/
|
*/
|
||||||
export const updateEdgeBase = <EdgeType extends EdgeBase>(
|
export const updateEdgeBase = <EdgeType extends EdgeBase>(
|
||||||
oldEdge: EdgeType,
|
oldEdge: EdgeType,
|
||||||
|
|||||||
Reference in New Issue
Block a user