Page Contents

Home > @loopback/metadata > ClassDecoratorFactory > createDecorator

ClassDecoratorFactory.createDecorator() method

Create a class decorator function

Signature:

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

Parameters

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

Returns:

ClassDecorator