UNPKG

@loopback/docs

Version:
35 lines (22 loc) 1.03 kB
--- lang: en title: 'API docs: context.binding.getvalue_1' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.context.binding.getvalue_1.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [Binding](./context.binding.md) &gt; [getValue](./context.binding.getvalue_1.md) ## Binding.getValue() method Returns a value or promise for this binding in the given context. The resolved value can be `undefined` if `optional` is set to `true` in `options`<!-- -->. <b>Signature:</b> ```typescript getValue(ctx: Context, options?: ResolutionOptions): ValueOrPromise<T | undefined>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | ctx | <code>Context</code> | Context for the resolution | | options | <code>ResolutionOptions</code> | Optional options for binding and dependency resolution | <b>Returns:</b> `ValueOrPromise<T | undefined>`