The dependency injection container.

Methods

  • Injects the registered value for the provided token.

    Type Parameters

    • T

    Parameters

    • token: DiToken<T>

      The token to inject the registered value from.

    • resolvingStack: Function[] = []

      The stack of the dependency injection.

    Returns T

    The injected value.

    When no provider for the token could be found or when the found provider is invalid.

  • Registers the provider for dependency injection.

    Type Parameters

    • T

    Parameters

    Returns void

    When the provider is invalid.

  • Removes the provided token from the dependency injection system.

    Type Parameters

    • T

    Parameters

    • token: DiToken<T>

      The token to unregister.

    Returns void

    When the app is initialized or running.