@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
117 lines (56 loc) • 1.6 kB
Markdown
---
lang: en
title: 'API docs: metadata.metadataaccessor'
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.metadataaccessor.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/metadata](./metadata.md) > [MetadataAccessor](./metadata.metadataaccessor.md)
## MetadataAccessor class
A strongly-typed metadata accessor via reflection
**Signature:**
```typescript
export declare class MetadataAccessor<T, D extends DecoratorType = DecoratorType>
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
[key](./metadata.metadataaccessor.key.md)
</td><td markdown="1">
`readonly`
</td><td markdown="1">
string
</td><td markdown="1">
</td></tr>
</tbody></table>
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
[create(key)](./metadata.metadataaccessor.create.md)
</td><td markdown="1">
`static`
</td><td markdown="1">
Create a strongly-typed metadata accessor
</td></tr>
<tr><td markdown="1">
[toString()](./metadata.metadataaccessor.tostring.md)
</td><td markdown="1">
</td><td markdown="1">
</td></tr>
</tbody></table>