From 7f79ef45be4ba9bcfee9ec8c69cd54c75f24aec0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 30 Jan 2024 18:14:20 +0100 Subject: [PATCH] refactor: refine type casting in internal simulator communication code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../ChargingStationWorkerBroadcastChannel.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts b/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts index c464f9ca..c6e37f60 100644 --- a/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts +++ b/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts @@ -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}'`) -- 2.34.1