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