Page Contents

Home > @loopback/metadata > MetadataInspector > getClassMetadata

MetadataInspector.getClassMetadata() method

Get the metadata associated with the given key for a given class

Signature:

static getClassMetadata<T>(key: MetadataKey<T, ClassDecorator>, target: Function, options?: InspectionOptions): T | undefined;

Parameters

Parameter Type Description
key MetadataKey<T, ClassDecorator> Metadata key
target Function Class that contains the metadata
options InspectionOptions (Optional) Options for inspection

Returns:

T | undefined