Page Contents

Home > @loopback/metadata > MetadataInspector > defineMetadata

MetadataInspector.defineMetadata() method

Define metadata for the given target

Signature:

static defineMetadata<T>(key: MetadataKey<T, DecoratorType>, value: T, target: Object, member?: string): void;

Parameters

Parameter Type Description
key MetadataKey<T, DecoratorType> Metadata key
value T Metadata value
target Object Target for the metadata
member string (Optional) Optional property or method name

Returns:

void