A component follows the lifecycle of a container. It is a good place to configure event listeners making the glue with other bounded contexts.
Implement and register component
import inversion from "@tmorin/ceb-inversion-core"// implement a componentclass DummyComponent extends inversion.Component { constructor() { super() } async configure() { // execute things when container starts } async dispose() { // execute things when container stops }}// register the component in a moduleclass DummyModule extends inversion.AbstractModule { constructor() { super() } async configure() { this.registry.registerValue(inversion.ComponentSymbol, new DummyComponent()) }}
The method in invoked during the initialization phase of the Container.
The method in invoked during the dispose phase of the Container.
Generated using TypeDoc
A component follows the lifecycle of a container. It is a good place to configure event listeners making the glue with other bounded contexts.
Implement and register component