Methods
provide
-
Type parameters
Parameters
Returns T
register
- register<T>(instance: T, name?: Named<T>): T
-
Type parameters
Parameters
-
instance: T
-
Optional name: Named<T>
Returns T
Static provide
-
Type parameters
Parameters
Returns T
Static provideOrUse
- provideOrUse<T>(fallback: T, providerName: Named<T>): T
-
Type parameters
Parameters
-
fallback: T
-
providerName: Named<T>
Returns T
Static register
- register<T, I>(instance: I, name?: Named<T>): T
-
Type parameters
Parameters
-
instance: I
-
Optional name: Named<T>
Returns T
Static useOrProvide
- useOrProvide<T>(providerName: Named<T>, preferred?: T): T
-
Type parameters
Parameters
-
providerName: Named<T>
-
Optional preferred: T
Returns T
Prefer registered instance but fallback to using
fallback
without registering.useOrProvide