Page Contents
Home > @loopback/metadata > MetadataInspector > getDesignTypeForProperty
MetadataInspector.getDesignTypeForProperty() method
Get TypeScript design time type for a property
Signature:
static getDesignTypeForProperty(target: Object, propertyName: string): Function | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
target | Object | Class or prototype |
propertyName | string | Property name |
Returns:
Function | undefined
Design time metadata. The return value is undefined
when: - The property has type undefined
, null
- The TypeScript project has not enabled the compiler option emitDecoratorMetadata
. - The code is written in vanilla JavaScript.