Function AutoRegister

  • Decorator for enabling auto-registration of a class.

    Type Parameters

    • This extends object

    Parameters

    • enable: boolean = true

    Returns ClassDecorator<Constructor<This>>

    ⁤@AutoRegister()
    class Wizard {}

    const wizard = container.resolve(Wizard);
    container.isRegistered(Wizard); // => true

    @NO_SIDE_EFFECTS