UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

97 lines (48 loc) 1.68 kB
--- lang: en title: 'API docs: context.context.getconfigsync' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/context permalink: /doc/en/lb4/apidocs.context.context.getconfigsync.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; [getConfigSync](./context.context.getconfigsync.md) ## Context.getConfigSync() method Resolve configuration synchronously for the binding by key **Signature:** ```typescript getConfigSync<ConfigValueType>(key: BindingAddress, propertyPath?: string, resolutionOptions?: ResolutionOptions): ConfigValueType | undefined; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> key </td><td markdown="1"> [BindingAddress](./context.bindingaddress.md) </td><td markdown="1"> Binding key </td></tr> <tr><td markdown="1"> propertyPath </td><td markdown="1"> string </td><td markdown="1"> _(Optional)_ Property path for the option. For example, `x.y` requests for `config.x.y`<!-- -->. If not set, the `config` object will be returned. </td></tr> <tr><td markdown="1"> resolutionOptions </td><td markdown="1"> [ResolutionOptions](./context.resolutionoptions.md) </td><td markdown="1"> _(Optional)_ Options for the resolution. </td></tr> </tbody></table> **Returns:** ConfigValueType \| undefined