Page Contents
Home > @loopback/metadata > ClassDecoratorFactory > createDecorator
ClassDecoratorFactory.createDecorator() method
Create a class decorator function
Signature:
static createDecorator<S>(key: MetadataKey<S, ClassDecorator>, spec: S, options?: DecoratorOptions): ClassDecorator;
Parameters
Parameter | Type | Description |
---|---|---|
key | MetadataKey<S, ClassDecorator> | Metadata key |
spec | S | Metadata object from the decorator function |
options | DecoratorOptions | (Optional) Options for the decorator |
Returns:
ClassDecorator