Page Contents

Home > @loopback/metadata > MethodDecoratorFactory > createDecorator

MethodDecoratorFactory.createDecorator() method

Create a method decorator function

Signature:

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

Parameters

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

Returns:

MethodDecorator