Page Contents

Home > @loopback/metadata > PropertyDecoratorFactory > createDecorator

PropertyDecoratorFactory.createDecorator() method

Create a property decorator function

Signature:

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

Parameters

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

Returns:

PropertyDecorator