-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
Problem
We have code that is reimplementing the EventEmitter
concept:
Lines 148 to 161 in e983bfe
private async notifyDidChangeConfigurationListeners(): Promise<void> { | |
this.logging.debug('Notifying did change configuration listeners') | |
const updatedConfig = this.configurationCache.getConfig() | |
const listenPromises = Array.from(this.handleDidChangeConfigurationListeners, async listener => { | |
try { | |
await listener(updatedConfig) | |
} catch (error) { | |
this.logging.error(`Error occured in did change configuration listener: ${error}`) | |
} | |
}) | |
await Promise.allSettled(listenPromises) | |
} |
Expected behavior
replace all such code with EventEmitter
or EventTarget (web compatible)
Metadata
Metadata
Assignees
Labels
No labels