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