---
lang: en
title: 'API docs: metadata.decoratorfactory.gettarget'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/metadata
permalink: /doc/en/lb4/apidocs.metadata.decoratorfactory.gettarget.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/metadata](./metadata.md) &gt; [DecoratorFactory](./metadata.decoratorfactory.md) &gt; [getTarget](./metadata.decoratorfactory.gettarget.md)

## DecoratorFactory.getTarget() method

Get the optional decoration target of a given spec

<b>Signature:</b>

```typescript
getTarget(spec: T): any;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  spec | <code>T</code> | Metadata spec |

<b>Returns:</b>

`any`


