Page Contents

Home > @loopback/context > Context > getScopedContext

Context.getScopedContext() method

Get the context matching the scope

Signature:

getScopedContext(scope: BindingScope.APPLICATION | BindingScope.SERVER | BindingScope.REQUEST): Context | undefined;

Parameters

Parameter Type Description
scope [BindingScope.APPLICATION](/doc/en/lb4/apidocs.context.bindingscope.html) \| [BindingScope.SERVER](/doc/en/lb4/apidocs.context.bindingscope.html) \| [BindingScope.REQUEST](/doc/en/lb4/apidocs.context.bindingscope.html) Binding scope

Returns:

Context | undefined