---
lang: en
title: 'API docs: metadata.decoratoroptions'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/metadata
permalink: /doc/en/lb4/apidocs.metadata.decoratoroptions.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/metadata](./metadata.md) &gt; [DecoratorOptions](./metadata.decoratoroptions.md)

## DecoratorOptions interface

Options for a decorator

**Signature:**

```typescript
export interface DecoratorOptions 
```

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[allowInheritance?](./metadata.decoratoroptions.allowinheritance.md)


</td><td>


</td><td>

boolean


</td><td>

_(Optional)_ Controls if inherited metadata will be honored. Default to `true`<!-- -->.


</td></tr>
<tr><td>

[cloneInputSpec?](./metadata.decoratoroptions.cloneinputspec.md)


</td><td>


</td><td>

boolean


</td><td>

_(Optional)_ Controls if the value of `spec` argument will be cloned. Sometimes we use shared spec for the decoration, but the decorator function might need to mutate the object. Cloning the input spec makes it safe to use the same spec (`template`<!-- -->) to decorate different members.

Default to `true`<!-- -->.


</td></tr>
<tr><td>

[decoratorName?](./metadata.decoratoroptions.decoratorname.md)


</td><td>


</td><td>

string


</td><td>

_(Optional)_ Name of the decorator for debugging purpose, such as `@inject`


</td></tr>
</tbody></table>


