Page Contents

Home > @loopback/metadata > ParameterDecoratorFactory > createDecorator

ParameterDecoratorFactory.createDecorator() method

Create a parameter decorator function

Signature:

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

Parameters

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

Returns:

ParameterDecorator