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 |
(Optional) Options for the decorator |
Returns:
ClassDecorator