@lppedd/di-wise-neo - v0.22.0
    Preparing search index...

    Function Injectable

    • Class decorator that registers additional aliasing tokens for the decorated type.

      The aliases are added using ExistingProvider(s) when the class is first registered in the container.

      Example:

      @Injectable(Weapon)
      class Rifle {}

      Note that @Injectable decorators can be stacked to add multiple aliases.

      Example:

      @Injectable(Weapon)
      @Injectable(Gun) // Or just @Injectable(Weapon, Gun)
      class Rifle {}

      Type Parameters

      • Value
      • This extends object

      Parameters

      Returns ClassDecorator<This>

    • Class decorator that registers additional aliasing tokens for the decorated type.

      The aliases are added using ExistingProvider(s) when the class is first registered in the container.

      Example:

      @Injectable(Weapon)
      class Rifle {}

      Note that @Injectable decorators can be stacked to add multiple aliases.

      Example:

      @Injectable(Weapon)
      @Injectable(Gun) // Or just @Injectable(Weapon, Gun)
      class Rifle {}

      Type Parameters

      • VA
      • VB
      • This extends object

      Parameters

      Returns ClassDecorator<This>

    • Class decorator that registers additional aliasing tokens for the decorated type.

      The aliases are added using ExistingProvider(s) when the class is first registered in the container.

      Example:

      @Injectable(Weapon)
      class Rifle {}

      Note that @Injectable decorators can be stacked to add multiple aliases.

      Example:

      @Injectable(Weapon)
      @Injectable(Gun) // Or just @Injectable(Weapon, Gun)
      class Rifle {}

      Type Parameters

      • VA
      • VB
      • VC
      • This extends object

      Parameters

      Returns ClassDecorator<This>

    • Class decorator that registers additional aliasing tokens for the decorated type.

      The aliases are added using ExistingProvider(s) when the class is first registered in the container.

      Example:

      @Injectable(Weapon)
      class Rifle {}

      Note that @Injectable decorators can be stacked to add multiple aliases.

      Example:

      @Injectable(Weapon)
      @Injectable(Gun) // Or just @Injectable(Weapon, Gun)
      class Rifle {}

      Type Parameters

      • VA
      • VB
      • VC
      • VD
      • This extends object

      Parameters

      Returns ClassDecorator<This>

    • Class decorator that registers additional aliasing tokens for the decorated type.

      The aliases are added using ExistingProvider(s) when the class is first registered in the container.

      Example:

      @Injectable(Weapon)
      class Rifle {}

      Note that @Injectable decorators can be stacked to add multiple aliases.

      Example:

      @Injectable(Weapon)
      @Injectable(Gun) // Or just @Injectable(Weapon, Gun)
      class Rifle {}

      Type Parameters

      • VA
      • VB
      • VC
      • VD
      • VE
      • This extends object

      Parameters

      Returns ClassDecorator<This>

    • Class decorator that registers additional aliasing tokens for the decorated type.

      The aliases are added using ExistingProvider(s) when the class is first registered in the container.

      Example:

      @Injectable(Weapon)
      class Rifle {}

      Note that @Injectable decorators can be stacked to add multiple aliases.

      Example:

      @Injectable(Weapon)
      @Injectable(Gun) // Or just @Injectable(Weapon, Gun)
      class Rifle {}

      Type Parameters

      • VA
      • VB
      • VC
      • VD
      • VE
      • VF
      • This extends object

      Parameters

      Returns ClassDecorator<This>

    • Class decorator that registers an additional aliasing token for the decorated type.

      The alias is added using an ExistingProvider when the class is first registered in the container.

      This overload allows referencing tokens that are declared later in the file by using the tokenRef helper function.

      Example:

      @Injectable(tokenRef(() => Weapon)) // Weapon is declared after Rifle
      class Rifle {}
      // Other code...
      const Weapon = createType("Weapon");

      Note that @Injectable decorators can be stacked to add multiple aliases.

      Example:

      @Injectable(tokenRef(() => Weapon))
      @Injectable(Gun)
      class Rifle {}

      Type Parameters

      • Value
      • This extends object

      Parameters

      Returns ClassDecorator<This>