Page Contents
Home > @loopback/context > Binding > getValue
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.
Signature:
getValue(ctx: Context, options?: ResolutionOptions): ValueOrPromise<T | undefined>;
Parameters
| Parameter | Type | Description |
|---|---|---|
|
ctx |
Context for the resolution | |
|
options |
(Optional) Optional options for binding and dependency resolution |
Returns:
ValueOrPromise<T | undefined>