Page Contents

Home > @loopback/metadata > PropertyDecoratorFactory > createDecorator

PropertyDecoratorFactory.createDecorator() method

Create a property decorator function

Signature:

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

Parameters

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

Returns:

PropertyDecorator