README.md: document added UI protocol features
[e-mobility-charging-stations-simulator.git] / src / charging-station / WorkerBroadcastChannel.ts
index ea89dc3dbf65f093f0a0bbfacdfdb32aab3c5f62..b19bf946dc633db77e5c690e75dd4b921de6868a 100644 (file)
@@ -1,7 +1,8 @@
 import { BroadcastChannel } from 'worker_threads';
 
 import BaseError from '../exception/BaseError';
-import {
+import type { JsonType } from '../types/JsonType';
+import type {
   BroadcastChannelRequest,
   BroadcastChannelResponse,
   MessageEvent,
@@ -20,11 +21,11 @@ export default abstract class WorkerBroadcastChannel extends BroadcastChannel {
     this.postMessage(response);
   }
 
-  protected isRequest(message: any): boolean {
+  protected isRequest(message: JsonType[]): boolean {
     return Array.isArray(message) && message.length === 3;
   }
 
-  protected isResponse(message: any): boolean {
+  protected isResponse(message: JsonType[]): boolean {
     return Array.isArray(message) && message.length === 2;
   }