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

Function resolveInjectedProperties

packages/context/src/resolver.ts:265–284  ·  view source on GitHub ↗
(
  constructor: Function,
  ctx: Context,
  session?: ResolutionSession,
)

Source from the content-addressed store, hash-verified

263 * @param session - Optional session for binding and dependency resolution
264 */
265export function resolveInjectedProperties(
266 constructor: Function,
267 ctx: Context,
268 session?: ResolutionSession,
269): ValueOrPromise<MapObject<BoundValue>> {
270 /* istanbul ignore if */
271 if (debug.enabled) {
272 debug('Resolving injected properties for %s', getTargetName(constructor));
273 }
274 const injectedProperties = describeInjectedProperties(constructor.prototype);
275
276 return resolveMap(injectedProperties, injection =>
277 resolve(
278 ctx,
279 injection,
280 // Clone the session so that multiple properties can be resolved in parallel
281 ResolutionSession.fork(session),
282 ),
283 );
284}

Callers 1

instantiateClassFunction · 0.85

Calls 4

resolveMapFunction · 0.90
forkMethod · 0.80
resolveFunction · 0.70

Tested by

no test coverage detected