build(ci): fix linting
[e-mobility-charging-stations-simulator.git] / ui / web / src / composables / UIClient.ts
index 7c0c06c121be0da21190687cc2ea752feb197fd3..3e7856e483115bb6911a76a345efff0430638566 100644 (file)
@@ -5,17 +5,17 @@ import {
   type RequestPayload,
   type ResponsePayload,
   ResponseStatus,
-} from '@/types/UIProtocol';
+} from '@/types';
 import config from '@/assets/config';
 
 type ResponseHandler = {
   procedureName: ProcedureName;
   resolve: (value: ResponsePayload | PromiseLike<ResponsePayload>) => void;
-  reject: (reason?: any) => void;
+  reject: (reason?: unknown) => void;
 };
 
 export default class UIClient {
-  private static _instance: UIClient | null = null;
+  private static instance: UIClient | null = null;
 
   private ws!: WebSocket;
   private responseHandlers: Map<string, ResponseHandler>;
@@ -26,10 +26,10 @@ export default class UIClient {
   }
 
   public static getInstance() {
-    if (UIClient._instance === null) {
-      UIClient._instance = new UIClient();
+    if (UIClient.instance === null) {
+      UIClient.instance = new UIClient();
     }
-    return UIClient._instance;
+    return UIClient.instance;
   }
 
   public registerWSonOpenListener(listener: (event: Event) => void) {
@@ -128,7 +128,7 @@ export default class UIClient {
     id: string,
     procedureName: ProcedureName,
     resolve: (value: ResponsePayload | PromiseLike<ResponsePayload>) => void,
-    reject: (reason?: any) => void
+    reject: (reason?: unknown) => void
   ): void {
     this.responseHandlers.set(id, { procedureName, resolve, reject });
   }