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.


getValue(ctx: Context, options?: ResolutionOptions): ValueOrPromise<T | undefined>;


Parameter Type Description
ctx Context Context for the resolution
options ResolutionOptions (Optional) Optional options for binding and dependency resolution


ValueOrPromise<T | undefined>