Page Contents

Home > @loopback/metadata > MetadataInspector > getDesignTypeForProperty

MetadataInspector.getDesignTypeForProperty() method

Get TypeScript design time type for a property


static getDesignTypeForProperty(target: Object, propertyName: string): Function | undefined;


Parameter Type Description
target Object Class or prototype
propertyName string Property name


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.