@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
33 lines (22 loc) • 1.5 kB
Markdown
---
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) > [@loopback/metadata](./metadata.md) > [DecoratorOptions](./metadata.decoratoroptions.md)
## DecoratorOptions interface
Options for a decorator
<b>Signature:</b>
```typescript
export interface DecoratorOptions
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [allowInheritance?](./metadata.decoratoroptions.allowinheritance.md) | boolean | <i>(Optional)</i> Controls if inherited metadata will be honored. Default to <code>true</code>. |
| [cloneInputSpec?](./metadata.decoratoroptions.cloneinputspec.md) | boolean | <i>(Optional)</i> Controls if the value of <code>spec</code> 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 (<code>template</code>) to decorate different members.<!-- -->Default to <code>true</code>. |
| [decoratorName?](./metadata.decoratoroptions.decoratorname.md) | string | <i>(Optional)</i> Name of the decorator for debugging purpose, such as <code>@inject</code> |