+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';
}
this.validateMessageEvent(messageEvent);
const [uuid, responsePayload] = messageEvent.data as BroadcastChannelResponse;
+ // 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 {