perf: properly bound methods in hot paths
[e-mobility-charging-stations-simulator.git] / src / utils / Configuration.ts
index 36b4e362a565f3f998df78cd01d73da56e0a5b96..8c3d15ccbdde967cb0051f9dab2cd36f5c5d9c7f 100644 (file)
@@ -128,7 +128,7 @@ export class Configuration {
     !Utils.isUndefined(Configuration.getConfig()['stationTemplateURLs']) &&
       (Configuration.getConfig().stationTemplateUrls = Configuration.getConfig()[
         'stationTemplateURLs'
-      ] as unknown as StationTemplateUrl[]);
+      ] as StationTemplateUrl[]);
     Configuration.getConfig().stationTemplateUrls.forEach((stationUrl: StationTemplateUrl) => {
       if (!Utils.isUndefined(stationUrl['numberOfStation'])) {
         console.error(
@@ -322,13 +322,13 @@ export class Configuration {
     ) {
       console.error(
         chalk`{green ${Configuration.logPrefix()}} {red Deprecated configuration key '${key}' usage in section '${sectionName}'${
-          logMsgToAppend.trim().length > 0 && `. ${logMsgToAppend}`
+          logMsgToAppend.trim().length > 0 ? `. ${logMsgToAppend}` : ''
         }}`
       );
     } else if (!Utils.isUndefined(Configuration.getConfig()[key])) {
       console.error(
         chalk`{green ${Configuration.logPrefix()}} {red Deprecated configuration key '${key}' usage${
-          logMsgToAppend.trim().length > 0 && `. ${logMsgToAppend}`
+          logMsgToAppend.trim().length > 0 ? `. ${logMsgToAppend}` : ''
         }}`
       );
     }