Page Contents

Home > @loopback/metadata > DecoratorFactory > _createDecorator

DecoratorFactory._createDecorator() method

Create a decorator function

Signature:

protected static _createDecorator<T, M extends T | MetadataMap<T> | MetadataMap<T[]>, D extends DecoratorType>(key: MetadataKey<T, D>, spec: T, options?: DecoratorOptions): D;

Parameters

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

Returns:

D