@lppedd/di-wise-neo - v0.6.0
    Preparing search index...

    Function EagerInstantiate

    • 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.

      Returns ClassDecorator

      @EagerInstantiate()
      class Wizard {}

      // Wizard is registered with Container scope, and an instance
      // is immediately created and cached by the container
      const wizard = container.register(Wizard);

      @NO_SIDE_EFFECTS