injects
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

injectables

injectables: object

All injectables.

Type declaration

  • [k: string]: any

Functions

Injectable

  • Injectable(constructorOrKey: Function | string, instance?: any): void
  • Register an injectable. Can be used as a class decorator or as a function.

    Parameters

    • constructorOrKey: Function | string

      class constructor or custom string key

    • Optional instance: any

      custom instance to register (optional with class constructor, mandatory with string key)

    Returns void

exists

  • exists(name: string): boolean
  • In order to know if a dependency exists or not.

    Parameters

    • name: string

      dependency name

    Returns boolean

    true if dependency exist, false otherwise

inject

  • inject(constructorOrKey: Function | string): any
  • Inject unique instance associated with class name or with custom string key. Create unique class instance if it doesn't exist.

    Parameters

    • constructorOrKey: Function | string

      class constructor or custom string key

    Returns any

    the unique instance associated with class name or with custom string key

resetInjectable

  • resetInjectable(name: string): void
  • Only for tests : delete an injectable

    Parameters

    • name: string

    Returns void

resetInjectables

  • resetInjectables(): void
  • Only for tests : delete all injectables

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc