({ wrapperRef }: InstanceLink)
| 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 | } |
no test coverage detected