@loopback/docs
Version:
Documentation for LoopBack 4
37 lines (24 loc) • 1.04 kB
Markdown
lang: en
title: 'API docs: metadata.namespacedreflect.hasmetadata'
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.namespacedreflect.hasmetadata.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/metadata](./metadata.md) > [NamespacedReflect](./metadata.namespacedreflect.md) > [hasMetadata](./metadata.namespacedreflect.hasmetadata.md)
## NamespacedReflect.hasMetadata() method
Check if the target has corresponding metadata
<b>Signature:</b>
```typescript
hasMetadata(metadataKey: string, target: Object, propertyKey?: string): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| metadataKey | <code>string</code> | Key |
| target | <code>Object</code> | Target |
| propertyKey | <code>string</code> | Optional property key |
<b>Returns:</b>
`boolean`