---
lang: en
title: 'API docs: metadata.metadatainspector.getdesigntypeforproperty'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/metadata
permalink: /doc/en/lb4/apidocs.metadata.metadatainspector.getdesigntypeforproperty.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/metadata](./metadata.md) &gt; [MetadataInspector](./metadata.metadatainspector.md) &gt; [getDesignTypeForProperty](./metadata.metadatainspector.getdesigntypeforproperty.md)

## MetadataInspector.getDesignTypeForProperty() method

Get TypeScript design time type for a property

**Signature:**

```typescript
static getDesignTypeForProperty(target: Object, propertyName: string): Function | undefined;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

target


</td><td markdown="1">

Object


</td><td markdown="1">

Class or prototype


</td></tr>
<tr><td markdown="1">

propertyName


</td><td markdown="1">

string


</td><td markdown="1">

Property name


</td></tr>
</tbody></table>

**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.


