Page Contents

Home > @loopback/context > Context > getOwnerContext

Context.getOwnerContext() method

Get the owning context for a binding or its key

Signature:

getOwnerContext(keyOrBinding: BindingAddress | Readonly<Binding<unknown>>): Context | undefined;

Parameters

Parameter Type Description
keyOrBinding [BindingAddress](/doc/en/lb4/apidocs.context.bindingaddress.html) \| Readonly<[Binding](/doc/en/lb4/apidocs.context.binding.html)<unknown>> Binding object or key

Returns:

Context | undefined