refactor: refine type casting in internal simulator communication code
[e-mobility-charging-stations-simulator.git] / src / charging-station / broadcast-channel / ChargingStationWorkerBroadcastChannel.ts
index c464f9ca11d33222925f2ee0bf52c19fa37f8948..c6e37f6095a3ddbb5a4cfe125add8cc5f8434ea4 100644 (file)
@@ -345,7 +345,10 @@ export class ChargingStationWorkerBroadcastChannel extends WorkerBroadcastChanne
         return await commandHandler(requestPayload)
       }
       return (
-        commandHandler as (requestPayload?: BroadcastChannelRequestPayload) => CommandResponse
+        commandHandler as (
+          requestPayload?: BroadcastChannelRequestPayload
+          // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
+        ) => CommandResponse | void
       )(requestPayload)
     }
     throw new BaseError(`Unknown worker broadcast channel command: '${command}'`)