@loopback/docs
Version:
Documentation for LoopBack 4
32 lines (21 loc) • 1.03 kB
Markdown
lang: en
title: 'API docs: metadata.decoratorfactory.(constructor)'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.metadata.decoratorfactory.(constructor).html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/metadata](./metadata.md) > [DecoratorFactory](./metadata.decoratorfactory.md) > [(constructor)](./metadata.decoratorfactory.(constructor).md)
## DecoratorFactory.(constructor)
Construct a new class decorator factory
<b>Signature:</b>
```typescript
constructor(key: string, spec: T, options?: DecoratorOptions | undefined);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| key | <code>string</code> | Metadata key |
| spec | <code>T</code> | Metadata object from the decorator function |
| options | <code>DecoratorOptions | undefined</code> | Options for the decorator. Default to <code>{allowInheritance: true}</code> if not provided |