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


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


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


T | undefined