Page Contents

Home > @loopback/metadata > DecoratorOptions > cloneInputSpec

DecoratorOptions.cloneInputSpec property

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.


cloneInputSpec?: boolean;