thiagoelg commented on code in PR #3575:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3575#discussion_r3284867413


##########
packages/bpmn-editor/src/normalization/normalize.ts:
##########
@@ -31,6 +32,86 @@ type WithRequiredDeep<T, K extends keyof any> = T extends 
undefined
         ? { [P in K]-?: NonNullable<WithRequiredDeep<T[P], K>> }
         : T);
 
+// Get the array for `key`, or create an empty one if missing.
+function addOrGetGroup<K, V>(map: Map<K, V[]>, key: K): V[] {
+  let group = map.get(key);
+  if (!group) {
+    group = [];
+    map.set(key, group);
+  }
+  return group;
+}
+
+function remapRef(remap: Map<string, string>, id: string | undefined): string 
| undefined {
+  return id === undefined ? undefined : remap.get(id) ?? id;
+}

Review Comment:
   What is the `remap` Map? A map of what?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to