Options
All
  • Public
  • Public/Protected
  • All
Menu

Class responsible to handle the scope of the instances created by the Container

Hierarchy

Index

Properties

Methods

Properties

Static Local

Local: Scope

A reference to the LocalScope. Local Scope return a new instance for each dependency resolution requested. This is the default scope.

Static Singleton

Singleton: Scope

A reference to the SingletonScope. Singleton Scope return the same instance for any dependency resolution requested.

Methods

reset

  • reset(source: Function): void
  • Called by the IoC Container when some configuration is changed on the Container binding.

    Parameters

    • source: Function

      The source type that has its configuration changed.

    Returns void

resolve

  • resolve(provider: Provider, source: Function): any
  • Method called when the Container needs to resolve a dependency. It should return the instance that will be returned by the Container.

    Parameters

    • provider: Provider

      The provider associated with the current bind. Used to create new instances when necessary.

    • source: Function

      The source type of this bind.

    Returns any

    the resolved instance.

Generated using TypeDoc