Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'@inject is not supported for a static property: ' +
DecoratorFactory.getTargetName(target, member),
);
}
if (methodDescriptorOrParameterIndex) {
// Method
throw new Error(
'@inject cannot be used on a method: ' +
DecoratorFactory.getTargetName(
target,
member,
methodDescriptorOrParameterIndex,
),
);
}
const propDecorator: PropertyDecorator = PropertyDecoratorFactory.createDecorator<
Injection
>(
PROPERTIES_KEY,
{
target,
member,
methodDescriptorOrParameterIndex,
bindingSelector,
metadata: injectionMetadata,
resolve,
},
// Do not deep clone the spec as only metadata is mutable and it's
// shallowly cloned
{cloneInputSpec: false, decoratorName: injectionMetadata.decorator},
);
propDecorator(target, member!);