Page Contents

Home > @loopback/metadata > NamespacedReflect > hasMetadata

NamespacedReflect.hasMetadata() method

Check if the target has corresponding metadata

Signature:

hasMetadata(metadataKey: string, target: Object, propertyKey?: string): boolean;

Parameters

Parameter Type Description
metadataKey string Key
target Object Target
propertyKey string (Optional) Optional property key

Returns:

boolean