Page Contents

Home > @loopback/metadata > DecoratorOptions

DecoratorOptions interface

Options for a decorator

Signature:

export interface DecoratorOptions 

Properties

Property Modifiers Type Description
[allowInheritance?](/doc/en/lb4/apidocs.metadata.decoratoroptions.allowinheritance.html) boolean _(Optional)_ Controls if inherited metadata will be honored. Default to `true`.
[cloneInputSpec?](/doc/en/lb4/apidocs.metadata.decoratoroptions.cloneinputspec.html) boolean _(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`.
[decoratorName?](/doc/en/lb4/apidocs.metadata.decoratoroptions.decoratorname.html) string _(Optional)_ Name of the decorator for debugging purpose, such as `@inject`