---
lang: en
title: 'API docs: metadata.parameterdecoratorfactory.createdecorator'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.metadata.parameterdecoratorfactory.createdecorator.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/metadata](./metadata.md) &gt; [ParameterDecoratorFactory](./metadata.parameterdecoratorfactory.md) &gt; [createDecorator](./metadata.parameterdecoratorfactory.createdecorator.md)

## ParameterDecoratorFactory.createDecorator() method

Create a parameter decorator function

<b>Signature:</b>

```typescript
static createDecorator<T>(key: MetadataKey<T, ParameterDecorator>, spec: T, options?: DecoratorOptions): ParameterDecorator;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  key | <code>MetadataKey&lt;T, ParameterDecorator&gt;</code> | Metadata key |
|  spec | <code>T</code> | Metadata object from the decorator function |
|  options | <code>DecoratorOptions</code> | Options for the decorator |

<b>Returns:</b>

`ParameterDecorator`


