Update linter

This commit is contained in:
Thomas Nordquist
2020-04-16 10:56:46 +02:00
parent 19e8bfdb37
commit 30af13f793
53 changed files with 92 additions and 97 deletions

View File

@@ -22,12 +22,12 @@ export class IpcRendererEventBus implements EventBusInterface {
this.ipc.removeAllListeners(event.topic)
}
public unsubscribe<MessageType>(event: Event<MessageType>, callback: any) {
const item = this.callbacks.find((store) => store.callback === callback)
const item = this.callbacks.find(store => store.callback === callback)
if (!item) {
return
}
this.ipc.removeListener(event.topic, item.wrappedCallback)
this.callbacks = this.callbacks.filter((a) => a !== item)
this.callbacks = this.callbacks.filter(a => a !== item)
}
public emit<MessageType>(event: Event<MessageType>, msg: MessageType) {
this.ipc.send(event.topic, msg)