Page Contents

Home > @loopback/metadata > DecoratorFactory > duplicateDecorationError

DecoratorFactory.duplicateDecorationError() method

Create an error to report if the decorator is applied to the target more than once

Signature:

protected duplicateDecorationError(target: Object, member?: string | symbol, descriptorOrIndex?: TypedPropertyDescriptor<any> | number): Error;

Parameters

Parameter Type Description
target Object Decoration target
member string | symbol (Optional) Optional property or method
descriptorOrIndex TypedPropertyDescriptor<any> | number (Optional) Optional parameter index or method descriptor

Returns:

Error