InversifyJS
InversifyJS copied to clipboard
how can we group different provides into separated modules in inversify-binding-decorators?
I got 3 classes, and I would like to have (ServiceA) as a group, and (ServiceB, ServiceBChild) as another group. Such that, there are 2 modules can be provided.
Expected Behavior
@provide("ServiceA")
class ServiceA {
}
@provide("ServiceB1")
class ServiceB1 {
}
@provide("ServiceB2")
class ServiceB2 {
}
// ...
const container = new Container();
container.load(moduleA); // moduleA contains ServiceA only.
container.load(moduleB); // moduleB container ServiceB1 and serviceB2
maybe you need see: container_modules