UNPKG

@loopback/docs

Version:
27 lines (17 loc) 993 B
--- lang: en title: 'API docs: context.inject.getter' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.context.inject.getter.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [inject](./context.inject.md) &gt; [getter](./context.inject.getter.md) ## inject.getter variable Inject a function for getting the actual bound value. This is useful when implementing Actions, where the action is instantiated for Sequence constructor, but some of action's dependencies become bound only after other actions have been executed by the sequence. See also `Getter<T>`<!-- -->. <b>Signature:</b> ```typescript getter: (bindingSelector: BindingSelector<unknown>, metadata?: InjectionMetadata | undefined) => (target: Object, member: string, methodDescriptorOrParameterIndex?: number | TypedPropertyDescriptor<any> | undefined) => void ```