Page Contents

Home > @loopback/context > config > getter

config.getter() function

@inject.getter decorator to inject a config getter function

Signature:

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

Parameters

Parameter Type Description
propertyPath string \| [ConfigInjectionMetadata](/doc/en/lb4/apidocs.context.configinjectionmetadata.html) _(Optional)_ Optional property path of the config object
metadata [ConfigInjectionMetadata](/doc/en/lb4/apidocs.context.configinjectionmetadata.html) _(Optional)_ Injection metadata

Returns:

(target: Object, member: string | undefined, methodDescriptorOrParameterIndex?: number | TypedPropertyDescriptor<any> | undefined) => void