Fix build
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 27 Aug 2022 16:42:40 +0000 (18:42 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 27 Aug 2022 16:42:40 +0000 (18:42 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/UIServiceWorkerBroadcastChannel.ts
src/types/WorkerBroadcastChannel.ts

index 8a85565ee88469d20e959f6b531c73a0d4db94cb..c64a7ccc2212d021189b373278ad8d5a804961bc 100644 (file)
@@ -1,3 +1,4 @@
+import type { ResponsePayload } from '../types/UIProtocol';
 import type { BroadcastChannelResponse, MessageEvent } from '../types/WorkerBroadcastChannel';
 import logger from '../utils/Logger';
 import type AbstractUIService from './ui-server/ui-services/AbstractUIService';
@@ -24,7 +25,7 @@ export default class UIServiceWorkerBroadcastChannel extends WorkerBroadcastChan
     // TODO: handle multiple responses for the same uuid
     delete responsePayload.hashId;
 
-    this.uiService.sendResponse(uuid, responsePayload);
+    this.uiService.sendResponse(uuid, responsePayload as ResponsePayload);
   }
 
   private messageErrorHandler(messageEvent: MessageEvent): void {
index 00f648f3ab03a8edf7785e7ec609a0c6d88b44ff..0ca44adac903f816f6917a60e1587762235b26e9 100644 (file)
@@ -34,7 +34,7 @@ export type BroadcastChannelRequestPayload =
   | HashIdBroadcastChannelRequestPayload
   | HashIdsBroadcastChannelRequestPayload;
 
-export interface BroadcastChannelResponsePayload extends Omit<ResponsePayload, 'hashIds'> {
+export interface BroadcastChannelResponsePayload extends ResponsePayload {
   hashId: string;
 }