refactor: cleanup type definition in internal messaging
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 30 Jan 2024 20:14:35 +0000 (21:14 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 30 Jan 2024 20:14:35 +0000 (21:14 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts

index c6e37f6095a3ddbb5a4cfe125add8cc5f8434ea4..89f828b5a266bb7e57bf2ce0e669e108976f87b4 100644 (file)
@@ -285,8 +285,7 @@ export class ChargingStationWorkerBroadcastChannel extends WorkerBroadcastChanne
       return
     }
     let responsePayload: BroadcastChannelResponsePayload | undefined
-    // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
-    let commandResponse: CommandResponse | void
+    let commandResponse: CommandResponse | undefined
     this.commandHandler(command, requestPayload)
       .then(commandResponse => {
         if (commandResponse == null || isEmptyObject(commandResponse)) {