web-client-ui icon indicating copy to clipboard operation
web-client-ui copied to clipboard

Add functions for emitting/listening events

Open mofojed opened this issue 7 months ago • 1 comments

Currently when we emit events, we simply call eventHub.emit(eventName, ...), which does not offer any type protection. Similarly, we call eventHub.on(eventName, callback) which does not offer any type protection for the callback.

We should use functions to emit events and listen to them, so we get type protection. PanelEvent.OPEN is being wired up with #2144, we should wire up all the other events as well.

mofojed avatar Jul 16 '24 14:07 mofojed