(injection: Readonly<Injection>)
| 621 | * @param injection - Injection information |
| 622 | */ |
| 623 | export function inspectTargetType(injection: Readonly<Injection>) { |
| 624 | if (typeof injection.methodDescriptorOrParameterIndex === 'number') { |
| 625 | const designType = MetadataInspector.getDesignTypeForMethod( |
| 626 | injection.target, |
| 627 | injection.member!, |
| 628 | ); |
| 629 | return designType?.parameterTypes?.[ |
| 630 | injection.methodDescriptorOrParameterIndex as number |
| 631 | ]; |
| 632 | } |
| 633 | return MetadataInspector.getDesignTypeForProperty( |
| 634 | injection.target, |
| 635 | injection.member!, |
| 636 | ); |
| 637 | } |
| 638 | |
| 639 | /** |
| 640 | * Resolve an array of bound values matching the filter function for `@inject`. |
no test coverage detected