In the preceding section, we decorated the ActorStore class with the @provide decorators:
@provide(TYPE.ActorStore) export class ActorStore implements interfaces.ActorStore {
This decorator is an alternative to the InversifyJS biding syntax and is equivalent to the following:
container.bind<ActorStore>(TYPE.ActorStore).to(ActorStore);
The @provide decorator is not required but it is more convenient than the binding API. The @provide decorator can be created using the inversify-binding-decorators module as follows:
import { Container } from "inversify"; import { makeProvideDecorator } from "inversify-binding-decorators"; const container = new Container(); const provide = makeProvideDecorator(container); export ...