- requestPayload: BroadcastChannelRequestPayload,
- ): Promise<CommandResponse | void> {
- if (this.commandHandlers.has(command) === true) {
- this.cleanRequestPayload(command, requestPayload);
- return this.commandHandlers.get(command)!(requestPayload);
+ requestPayload: BroadcastChannelRequestPayload
+ // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
+ ): Promise<void | CommandResponse> {
+ if (this.commandHandlers.has(command)) {
+ this.cleanRequestPayload(command, requestPayload)
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ return await this.commandHandlers.get(command)!(requestPayload)