MCPcopy
hub / github.com/nestjs/nest / lookupComponentInParentModules

Method lookupComponentInParentModules

packages/core/injector/injector.ts:635–659  ·  view source on GitHub ↗
(
    dependencyContext: InjectorDependencyContext,
    moduleRef: Module,
    wrapper: InstanceWrapper<T>,
    resolutionContext: ResolutionContext = { contextId: STATIC_CONTEXT },
    keyOrIndex?: symbol | string | number,
  )

Source from the content-addressed store, hash-verified

633 }
634
635 public async lookupComponentInParentModules<T = any>(
636 dependencyContext: InjectorDependencyContext,
637 moduleRef: Module,
638 wrapper: InstanceWrapper<T>,
639 resolutionContext: ResolutionContext = { contextId: STATIC_CONTEXT },
640 keyOrIndex?: symbol | string | number,
641 ) {
642 const instanceWrapper = await this.lookupComponentInImports(
643 moduleRef,
644 dependencyContext.name!,
645 wrapper,
646 new Set<string>(),
647 resolutionContext,
648 keyOrIndex,
649 );
650 if (isNil(instanceWrapper)) {
651 throw new UnknownDependenciesException(
652 wrapper.name,
653 dependencyContext,
654 moduleRef,
655 { id: wrapper.id },
656 );
657 }
658 return instanceWrapper;
659 }
660
661 public async lookupComponentInImports(
662 moduleRef: Module,

Callers 1

lookupComponentMethod · 0.95

Calls 2

isNilFunction · 0.90

Tested by

no test coverage detected