Function injectBy

  • Inject an instance of a class.

    Type Parameters

    • Instance extends object

    Parameters

    Returns Instance

  • Inject an instance of a token.

    Type Parameters

    • Value

    Parameters

    • thisArg: any

      Used for resolving circular dependencies.

    • token: Token<Value>

    Returns Value

  • Inject an instance of a token, by checking each token in order until a registered one is found.

    Type Parameters

    • Values extends unknown[]

    Parameters

    • thisArg: any

      Used for resolving circular dependencies.

    • ...tokens: TokenList<Values>

    Returns Values[number]