Page Contents
Home > @loopback/context > Context > getConfigSync
Context.getConfigSync() method
Resolve configuration synchronously for the binding by key
Signature:
getConfigSync<ConfigValueType>(key: BindingAddress, propertyPath?: string, resolutionOptions?: ResolutionOptions): ConfigValueType | undefined;
Parameters
| Parameter | Type | Description |
|---|---|---|
| key | [BindingAddress](/doc/en/lb4/apidocs.context.bindingaddress.html) | Binding key |
| propertyPath | string | _(Optional)_ Property path for the option. For example, `x.y` requests for `config.x.y`. If not set, the `config` object will be returned. |
| resolutionOptions | [ResolutionOptions](/doc/en/lb4/apidocs.context.resolutionoptions.html) | _(Optional)_ Options for the resolution. |
Returns:
ConfigValueType | undefined