Align some types definition in UI
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 24 Sep 2022 22:02:58 +0000 (00:02 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 24 Sep 2022 22:02:58 +0000 (00:02 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/ui/web/src/types/ChargingStationType.ts

index dfa02403a72d365038eac1f9b5fd88a28e863d70..292cd1e13c6b1e5804a2b935a436ac621d394934 100644 (file)
@@ -3,7 +3,11 @@ import type { JsonObject } from './JsonType';
 export type ChargingStationData = {
   stationInfo: ChargingStationInfo;
   started: boolean;
-  wsState?: number;
+  wsState?:
+    | typeof WebSocket.CONNECTING
+    | typeof WebSocket.OPEN
+    | typeof WebSocket.CLOSING
+    | typeof WebSocket.CLOSED;
   bootNotificationResponse: BootNotificationResponse;
   connectors: ConnectorStatus[];
   automaticTransactionGeneratorStatuses?: Status[];