---
lang: en
title: 'API docs: metadata.decoratorfactory._constructor_'
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.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);
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  key | string | Metadata key |
|  spec | T | Metadata object from the decorator function |
|  options | [DecoratorOptions](./metadata.decoratoroptions.md) | Options for the decorator. Default to <code>{allowInheritance: true}</code> if not provided |


