credo-ts icon indicating copy to clipboard operation
credo-ts copied to clipboard

Move handler registration to the module class

Open TimoGlastra opened this issue 3 years ago • 0 comments

Should be done in 0.3.0 branch or main after it has been released.

By moving the handler registration to the module class we centralize module definition and we avoid the case where we need to inject some services just so they will register the handlers.

We do probably have to start using dependency injection for handlers, but that is doable.

Instead of doing dispatcher.registerHandler we now do something like dependencyManager.registerMessageHandler.

TimoGlastra avatar Sep 10 '22 13:09 TimoGlastra