---
lang: en
title: 'API docs: context.config.getter'
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.config.getter.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [config](./context.config.md) &gt; [getter](./context.config.getter.md)

## config.getter() function

`@inject.getter` decorator to inject a config getter function

**Signature:**

```typescript
getter: (propertyPath?: string | ConfigInjectionMetadata, metadata?: ConfigInjectionMetadata) => (target: Object, member: string | undefined, methodDescriptorOrParameterIndex?: number | TypedPropertyDescriptor<any> | undefined) => void
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  propertyPath | string \| [ConfigInjectionMetadata](./context.configinjectionmetadata.md) | _(Optional)_ Optional property path of the config object |
|  metadata | [ConfigInjectionMetadata](./context.configinjectionmetadata.md) | _(Optional)_ Injection metadata |

**Returns:**

(target: Object, member: string \| undefined, methodDescriptorOrParameterIndex?: number \| TypedPropertyDescriptor&lt;any&gt; \| undefined) =&gt; void


