Page Contents
Home > @loopback/context > Context > getConfigAsValueOrPromise
Context.getConfigAsValueOrPromise() method
Get the value or promise of configuration for a given binding by key
Signature:
getConfigAsValueOrPromise<ConfigValueType>(key: BindingAddress, propertyPath?: string, resolutionOptions?: ResolutionOptions): ValueOrPromise<ConfigValueType | undefined>;
Parameters
| Parameter | Type | Description |
|---|---|---|
|
key |
Binding key | |
|
propertyPath |
string |
(Optional) Property path for the option. For example, |
|
resolutionOptions |
(Optional) Options for the resolution. - optional: if not set or set to |
Returns:
ValueOrPromise<ConfigValueType | undefined>