Add supervision connection URL support setup through OCPP parameter
[e-mobility-charging-stations-simulator.git] / src / types / WebSocket.ts
index 0799f7b4e0f8023f64c22d5c7daab3cb37c2e40f..60b2f681ef1464b960e26ba783688067149e7e62 100644 (file)
@@ -1,4 +1,4 @@
-export const WebSocketCloseEventStatusString: Record<number, string> = Object.freeze({
+export const WebSocketCloseEventStatusString: Record<WebSocketCloseEventStatusCode, string> = Object.freeze({
   1000: 'Normal Closure',
   1001: 'Going Away',
   1002: 'Protocol Error',
@@ -35,3 +35,7 @@ export enum WebSocketCloseEventStatusCode {
   CLOSE_BAD_GATEWAY = 1014,
   CLOSE_TLS_HANDSHAKE = 1015
 }
+
+export interface WSError extends Error {
+  code?: string
+}