Options
All
  • Public
  • Public/Protected
  • All
Menu

A component follows the lifecycle of a container. It is a good place to configure event listeners making the glue with other bounded contexts.

example

Implement and register component

import inversion from "@tmorin/ceb-inversion-core"
// implement a component
class 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 module
class DummyModule extends inversion.AbstractModule {
constructor() {
super()
}
async configure() {
this.registry.registerValue(inversion.ComponentSymbol, new DummyComponent())
}
}

Hierarchy

  • Component

Index

Constructors

Methods

Constructors

constructor

Methods

configure

  • configure(): Promise<void>

dispose

  • dispose(): Promise<void>

Generated using TypeDoc