Quellcode durchsuchen

Add comments to FindObjectByID

ApisNecros vor 1 Jahr
Ursprung
Commit
3e00fed52c
1 geänderte Dateien mit 7 neuen und 0 gelöschten Zeilen
  1. 7 0
      5/5_1.ts

+ 7 - 0
5/5_1.ts

@@ -131,6 +131,13 @@ function ParseSourceDestinationRange(lineNumber: number, almanac: string[]): Map
     return rangeMap;
 }
 
+/**
+ * Find an IdentifiableObject by its ID number
+ *
+ * @param needle The ID number to find
+ * @param haystack The list to find the ID in
+ * @returns {IdentifiableObject|undefined} The object by that ID if found, or undefined
+ */
 function FindObjectByID(needle: number, haystack: IdentifiableObject[]): IdentifiableObject|undefined {
     return haystack.find((obj) => obj.ID == needle);
 }