Page Contents

Home > @loopback/metadata > ParameterDecoratorFactory > createDecorator

ParameterDecoratorFactory.createDecorator() method

Create a parameter decorator function

Signature:

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

Parameters

Parameter Type Description
key MetadataKey<T, ParameterDecorator> Metadata key
spec T Metadata object from the decorator function
options DecoratorOptions Options for the decorator

Returns:

ParameterDecorator