Class decorator that sets the class scope to Container and enables eager instantiation when the class is registered in the container.
This causes the container to immediately create and cache the instance of the class, instead of deferring instantiation until the first resolution.
@EagerInstantiate()class Wizard {}// Wizard is registered with Container scope, and an instance// is immediately created and cached by the containercontainer.register(Wizard); Copy
@EagerInstantiate()class Wizard {}// Wizard is registered with Container scope, and an instance// is immediately created and cached by the containercontainer.register(Wizard);
@NO_SIDE_EFFECTS
Class decorator that sets the class scope to Container and enables eager instantiation when the class is registered in the container.
This causes the container to immediately create and cache the instance of the class, instead of deferring instantiation until the first resolution.