inject-dependency
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Context
_aliases
_fabrics
_injects
_meta
_get
Alias
_get
Inject
Meta
_init
Meta
IfNot
Exists
_register
Alias
_register
Lazy
Dependency
_resolve
Lazy
bind
bind
Fabrica
resolve
Inject
Meta
Lazy
Inject
class
ToFunction
dependencies
fabrica
injectable
invariant
lazy
Inject
noop
once
singleton
Context exists in singleton for all app
Hierarchy
Context
Index
Properties
_aliases
_fabrics
_injects
_meta
Methods
_get
Alias
_get
Inject
Meta
_init
Meta
IfNot
Exists
_register
Alias
_register
Lazy
Dependency
_resolve
Lazy
bind
bind
Fabrica
resolve
Properties
Static
Private
_aliases
_aliases
:
Map
<
any
,
any
>
= new Map()
Static
Private
_fabrics
_fabrics
:
Map
<
any
,
Function
>
= new Map()
Static
Private
_injects
_injects
:
Map
<
any
,
LazyInject
>
= new Map()
Static
Private
_meta
_meta
:
Map
<
any
,
InjectMeta
>
= new Map()
Methods
Static
Private
_get
Alias
_get
Alias
(
clsOrAlias
:
any
)
:
any
Parameters
clsOrAlias:
any
Returns
any
Static
Private
_get
Inject
Meta
_get
Inject
Meta
(
cls
:
Function
)
:
InjectMeta
Parameters
cls:
Function
Returns
InjectMeta
Static
Private
_init
Meta
IfNot
Exists
_init
Meta
IfNot
Exists
(
targetClsOrAlias
:
any
)
:
void
Parameters
targetClsOrAlias:
any
Returns
void
Static
Private
_register
Alias
_register
Alias
(
cls
:
any
, als
:
any
)
:
void
Parameters
cls:
any
als:
any
Returns
void
Static
Private
_register
Lazy
Dependency
_register
Lazy
Dependency
(
clsOrAlias
:
any
, key
:
string
, dependency
:
any
, callback
:
Function
)
:
void
Parameters
clsOrAlias:
any
key:
string
dependency:
any
callback:
Function
Returns
void
Static
Private
_resolve
Lazy
_resolve
Lazy
(
clsOrAlias
:
any
)
:
LazyInject
Parameters
clsOrAlias:
any
Returns
LazyInject
Static
bind
bind
(
targetClsOrAlias
:
any
, cls
:
Function
)
:
Context
Parameters
targetClsOrAlias:
any
cls:
Function
Returns
Context
Static
bind
Fabrica
bind
Fabrica<T>
(
targetClsOrAlias
:
Function
, fabrica
:
function
)
:
Context
Type parameters
T
Parameters
targetClsOrAlias:
Function
fabrica:
function
(
)
:
T
Returns
T
Returns
Context
Static
resolve
resolve<C>
(
clsOrAlias
:
any
)
:
C
Type parameters
C
Parameters
clsOrAlias:
any
Returns
C
Generated using
TypeDoc
Context exists in singleton for all app