---
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>

key


</td><td>

[BindingAddress](./context.bindingaddress.md)


</td><td>

Binding key


</td></tr>
<tr><td>

propertyPath


</td><td>

string


</td><td>

_(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>

resolutionOptions


</td><td>

[ResolutionOptions](./context.resolutionoptions.md)


</td><td>

_(Optional)_ Options for the resolution.


</td></tr>
</tbody></table>
**Returns:**

ConfigValueType \| undefined


