@lppedd/di-wise-neo - v0.27.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 create and cache the instance of the class immediately, instead of deferring it until the first resolution.

      If the class cannot be resolved at registration time, registration fails.

      Example:

      @EagerInstantiate
      class Wizard {}

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

      Type Parameters

      Parameters

      Returns void