UNPKG

@loopback/docs

Version:
36 lines (23 loc) 1.18 kB
--- lang: en title: 'API docs: context.context.getconfig' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.context.context.getconfig.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [Context](./context.context.md) &gt; [getConfig](./context.context.getconfig.md) ## Context.getConfig() method Resolve configuration for the binding by key <b>Signature:</b> ```typescript getConfig<ConfigValueType>(key: BindingAddress, configPath?: string, resolutionOptions?: ResolutionOptions): Promise<ConfigValueType | undefined>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | key | <code>BindingAddress</code> | Binding key | | configPath | <code>string</code> | Property path for the option. For example, <code>x.y</code> requests for <code>&lt;config&gt;.x.y</code>. If not set, the <code>&lt;config&gt;</code> object will be returned. | | resolutionOptions | <code>ResolutionOptions</code> | Options for the resolution. | <b>Returns:</b> `Promise<ConfigValueType | undefined>`