---
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) &gt; [@loopback/metadata](./metadata.md) &gt; [DecoratorFactory](./metadata.decoratorfactory.md) &gt; [(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 &#124; undefined</code> | Options for the decorator. Default to <code>{allowInheritance: true}</code> if not provided |


