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

Function pluckInstance

packages/core/injector/abstract-instance-resolver.ts:29–38  ·  view source on GitHub ↗
({ wrapperRef }: InstanceLink)

Source from the content-addressed store, hash-verified

27 options,
28 );
29 const pluckInstance = ({ wrapperRef }: InstanceLink) => {
30 if (
31 wrapperRef.scope === Scope.REQUEST ||
32 wrapperRef.scope === Scope.TRANSIENT ||
33 !wrapperRef.isDependencyTreeStatic()
34 ) {
35 throw new InvalidClassScopeException(typeOrToken);
36 }
37 return wrapperRef.instance;
38 };
39 if (Array.isArray(instanceLinkOrArray)) {
40 return instanceLinkOrArray.map(pluckInstance);
41 }

Callers 2

findFunction · 0.85
resolvePerContextFunction · 0.85

Calls 2

loadPerContextMethod · 0.80

Tested by

no test coverage detected