refactor: cleanup loops over object keys
[e-mobility-charging-stations-simulator.git] / src / charging-station / Bootstrap.ts
index 1b4934edcc9c39127cc53bb349f25904f22590a7..ba4d14a8369b36e6a0696027d66ec9fb7906e2ca 100644 (file)
@@ -7,7 +7,7 @@ import { isMainThread } from 'node:worker_threads';
 
 import chalk from 'chalk';
 
-import { waitForChargingStationEvents } from './ChargingStationUtils';
+import { waitChargingStationEvents } from './ChargingStationUtils';
 import type { AbstractUIServer } from './ui-server/AbstractUIServer';
 import { UIServerFactory } from './ui-server/UIServerFactory';
 import { version } from '../../package.json' assert { type: 'json' };
@@ -174,7 +174,7 @@ export class Bootstrap extends EventEmitter {
           )
         );
         await Promise.race([
-          waitForChargingStationEvents(
+          waitChargingStationEvents(
             this,
             ChargingStationWorkerMessageEvents.stopped,
             this.numberOfChargingStations