Fix a type casting
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 9 Apr 2022 16:34:08 +0000 (18:34 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 9 Apr 2022 16:34:08 +0000 (18:34 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStationWorker.ts

index 6a6f631ca4597809fedafcaaeb696e8c35bd50d1..fb551a4565d82319cd07249b01cf7f6b65086ce2 100644 (file)
@@ -24,8 +24,8 @@ if (Utils.workerPoolInUse()) {
   addMessageListener();
   if (!Utils.isUndefined(workerData)) {
     startChargingStation({
-      index: (workerData as Record<string, unknown>).index as number,
-      templateFile: (workerData as Record<string, unknown>).templateFile as string,
+      index: (workerData as ChargingStationWorkerData).index,
+      templateFile: (workerData as ChargingStationWorkerData).templateFile,
     });
   }
 }