UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

26 lines (17 loc) 1.02 kB
--- lang: en title: 'API docs: metadata.decoratoroptions.cloneinputspec' 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.cloneinputspec.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) &gt; [cloneInputSpec](./metadata.decoratoroptions.cloneinputspec.md) ## 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`<!-- -->. <b>Signature:</b> ```typescript cloneInputSpec?: boolean; ```