Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function inspectTargetType(injection: Readonly) {
let type = MetadataInspector.getDesignTypeForProperty(
injection.target,
injection.member!,
);
if (type) {
return type;
}
const designType = MetadataInspector.getDesignTypeForMethod(
injection.target,
injection.member!,
);
type =
designType.parameterTypes[
injection.methodDescriptorOrParameterIndex as number
];
return type;
}