@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
40 lines (26 loc) • 1.53 kB
Markdown
---
lang: en
title: 'API docs: metadata.decoratorfactory.mergewithown'
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.decoratorfactory.mergewithown.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/metadata](./metadata.md) > [DecoratorFactory](./metadata.decoratorfactory.md) > [mergeWithOwn](./metadata.decoratorfactory.mergewithown.md)
## DecoratorFactory.mergeWithOwn() method
This method is called by the default implementation of the decorator function to merge the spec argument from the decoration with the own metadata for a class, all properties, all methods, or all method parameters that are decorated by this decorator.
It MUST be overridden by subclasses to process own metadata.
<b>Signature:</b>
```typescript
protected mergeWithOwn(ownMetadata: M, target: Object, member?: string | symbol, descriptorOrIndex?: TypedPropertyDescriptor<any> | number): M;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| ownMetadata | M | Own Metadata exists locally on the target |
| target | Object | Decoration target |
| member | string \| symbol | Optional property or method |
| descriptorOrIndex | TypedPropertyDescriptor<any> \| number | Optional parameter index or method descriptor |
<b>Returns:</b>
M