A named object that provides a value.

Type Parameters

  • T = any

Constructors

Accessors

Methods

Constructors

  • Creates a new Provider.

    Type Parameters

    • T = any

    Parameters

    • name: string

      The name of the component.

    • factory: Factory<T>

      A function that returns the component.

    • tags: string[] = []

      An optional array of string tags for the component.

    • logger: Logger = nullLogger

      The logger instance.

    Returns Provider<T>

Accessors

  • get name(): string
  • Returns string

    The component name.

  • get tags(): Set<string>
  • Returns Set<string>

    The tags for the component.

Methods

  • Instantiates the component.

    Parameters

    Returns Promise<T>

    the component as produced by the factory function.