Page Contents

Home > @loopback/metadata > DecoratorFactory > (constructor)

DecoratorFactory.(constructor)

Construct a new class decorator factory

Signature:

constructor(key: string, spec: T, options?: DecoratorOptions);

Parameters

Parameter Type Description
key string Metadata key
spec T Metadata object from the decorator function
options [DecoratorOptions](/doc/en/lb4/apidocs.metadata.decoratoroptions.html) _(Optional)_ Options for the decorator. Default to `{allowInheritance: true}` if not provided