Container class to manage the dependency injection container

Methods

  • clears the container instances, useful for testing when you are using container.registerInstance()

    Parameters

    • OptionalcacheDir: string

      the cache directory to use, defaults to constants.SOLO_CACHE_DIR

    • OptionallogLevel: string

      the log level to use, defaults to 'debug'

    • OptionaldevMode: boolean

      if true, show full stack traces in error messages

    Returns void

  • Initialize the container with the default dependencies

    Parameters

    • cacheDir: string = constants.SOLO_CACHE_DIR

      the cache directory to use, defaults to constants.SOLO_CACHE_DIR

    • logLevel: string = 'debug'

      the log level to use, defaults to 'debug'

    • devMode: boolean = false

      if true, show full stack traces in error messages

    Returns void

  • clears the container registries and re-initializes the container

    Parameters

    • OptionalcacheDir: string

      the cache directory to use, defaults to constants.SOLO_CACHE_DIR

    • OptionallogLevel: string

      the log level to use, defaults to 'debug'

    • OptionaldevMode: boolean

      if true, show full stack traces in error messages

    Returns void