From baf22c23cbb70886aaad00d19e22d3431af5bec4 Mon Sep 17 00:00:00 2001 From: elielnfinic <46634774+elielnfinic@users.noreply.github.com> Date: Wed, 13 Nov 2024 13:55:00 +0200 Subject: [PATCH] Adding inline doc --- packages/object/src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/object/src/index.ts b/packages/object/src/index.ts index 2ae6f877..b825786c 100644 --- a/packages/object/src/index.ts +++ b/packages/object/src/index.ts @@ -97,6 +97,13 @@ export class TopologyObject implements ITopologyObject { this._notify("callFn", [serializedVertex]); } + /* + * Merges the given vertices into the object's hashgraph. + * If `synchronizeVertices` is provided, it will be called for each vertex that cannot be merged due to a dependency issue. + * @param vertices - The vertices to merge + * @param synchronizeVertices - A callback to synchronize vertices if there is a dependency issue with the hashgraph + * @returns void + */ async merge( vertices: Vertex[], synchronizeVertices?: (croId: string, nodeId: string) => void,