@loopback/docs
Version:
Documentation for LoopBack 4
37 lines (24 loc) • 1.32 kB
Markdown
---
lang: en
title: 'API docs: metadata.decoratorfactory.duplicatedecorationerror'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/metadata
permalink: /doc/en/lb4/apidocs.metadata.decoratorfactory.duplicatedecorationerror.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/metadata](./metadata.md) > [DecoratorFactory](./metadata.decoratorfactory.md) > [duplicateDecorationError](./metadata.decoratorfactory.duplicatedecorationerror.md)
## DecoratorFactory.duplicateDecorationError() method
Create an error to report if the decorator is applied to the target more than once
<b>Signature:</b>
```typescript
protected duplicateDecorationError(target: Object, member?: string | symbol, descriptorOrIndex?: TypedPropertyDescriptor<any> | number): Error;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| target | <code>Object</code> | Decoration target |
| member | <code>string | symbol</code> | Optional property or method |
| descriptorOrIndex | <code>TypedPropertyDescriptor<any> | number</code> | Optional parameter index or method descriptor |
<b>Returns:</b>
`Error`