MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / getScopedContext

Method getScopedContext

packages/context/src/context.ts:511–522  ·  view source on GitHub ↗

* Get the context matching the scope * @param scope - Binding scope

(
    scope:
      | BindingScope.APPLICATION
      | BindingScope.SERVER
      | BindingScope.REQUEST,
  )

Source from the content-addressed store, hash-verified

509 * @param scope - Binding scope
510 */
511 getScopedContext(
512 scope:
513 | BindingScope.APPLICATION
514 | BindingScope.SERVER
515 | BindingScope.REQUEST,
516 ): Context | undefined {
517 if (this.scope === scope) return this;
518 if (this._parent) {
519 return this._parent.getScopedContext(scope);
520 }
521 return undefined;
522 }
523
524 /**
525 * Locate the resolution context for the given binding. Only bindings in the

Callers 2

getResolutionContextMethod · 0.95
context.unit.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected