From b3b45e6c81c2a01d793c3dc9ab48157e51c82ca3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 27 Aug 2022 18:42:40 +0200 Subject: [PATCH] Fix build MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/UIServiceWorkerBroadcastChannel.ts | 3 ++- src/types/WorkerBroadcastChannel.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/charging-station/UIServiceWorkerBroadcastChannel.ts b/src/charging-station/UIServiceWorkerBroadcastChannel.ts index 8a85565e..c64a7ccc 100644 --- a/src/charging-station/UIServiceWorkerBroadcastChannel.ts +++ b/src/charging-station/UIServiceWorkerBroadcastChannel.ts @@ -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 { diff --git a/src/types/WorkerBroadcastChannel.ts b/src/types/WorkerBroadcastChannel.ts index 00f648f3..0ca44ada 100644 --- a/src/types/WorkerBroadcastChannel.ts +++ b/src/types/WorkerBroadcastChannel.ts @@ -34,7 +34,7 @@ export type BroadcastChannelRequestPayload = | HashIdBroadcastChannelRequestPayload | HashIdsBroadcastChannelRequestPayload; -export interface BroadcastChannelResponsePayload extends Omit { +export interface BroadcastChannelResponsePayload extends ResponsePayload { hashId: string; } -- 2.34.1