Provides an interface to manage singletons by name. This function ensures that there is only one instance of SingletonManager per name, and it provides methods to interact with the singletons.

  • Parameters

    • name: string

      The name of the singleton group to manage.

    Returns SingletonFunctions

    An object containing methods to manage singletons within the specified group. This includes methods to set, get, check existence, update, remove, and clear singletons, as well as to register and unregister instances as singletons and retrieve all singleton keys.

    The returned object contains the following methods:

    • getSingleton
    • setSingletonIfNotExists
    • setSingleton
    • hasSingleton
    • updateSingleton
    • removeSingleton
    • registerInstanceAsSingleton
    • unregisterInstanceAsSingleton
    • clearSingletons
    • getAllSingletonKeys