Function injectable

  • Decorates a factory by passing resolved values as factory arguments.

    If an argument is an object which has tokens as its properties, then returns an object containing resolved values as properties.

    Returns

    Decorated factory which takes a dependency container as a single argument.

    Type Parameters

    • Tokens extends (Token<unknown> | {
          [key: string]: Token<unknown>;
      })[]

    • Values extends { [ K in string | number | symbol]: Tokens[K] extends Token<V> ? V : Tokens[K] extends TokenProps<Props> ? Props : never }

    • Result

    Parameters

    • this: unknown
    • factory: ((...params: Values) => Result)

      A factory.

        • (...params: Values): Result
        • Parameters

          • Rest ...params: Values

          Returns Result

    • Rest ...tokens: Tokens

      Tokens which correspond to factory arguments.

    Returns ((container: Container) => Result)

Generated using TypeDoc