Since Injex handles circular dependencies for you, one caveat is that you can't access injectable dependencies from module class constructors. Instead, you can use the @init() decorator to run module initialization upon creation.
You use the @init() decorator by decorating a module class method to behave as the initialize method. This method is called by the Injex runtime after all the modules created and instantiated.
import{ define, init }from"@injex/core";
@define()
exportclassZebraextendsAnimal{
@inject()private logger;
private _name:string;
constructor(name: string){
this._name= name;
// `this.logger` and other injectables are not accessible
// from the constructor, so their value is `undefined`.
Notice that you may return a promise from the initialization method if you like; Injex will "await" for it and return its promise from the factory method.