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 (Optional) Optional property path of the config object
metadata ConfigInjectionMetadata (Optional) Injection metadata

Returns:

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