Page Contents

Home > @loopback/metadata > MetadataInspector > getPropertyMetadata

MetadataInspector.getPropertyMetadata() method

Get the metadata associated with the given key for a given property of the target class or prototype

Signature:

static getPropertyMetadata<T>(key: MetadataKey<T, PropertyDecorator>, target: Object, propertyName: string, options?: InspectionOptions): T | undefined;

Parameters

Parameter Type Description
key MetadataKey<T, PropertyDecorator> Metadata key
target Object Class for static properties or prototype for instance properties
propertyName string Property name
options InspectionOptions (Optional) Options for inspection

Returns:

T | undefined