---
lang: en
title: 'API docs: metadata.metadatainspector.getdesigntypeformethod'
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.getdesigntypeformethod.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; [getDesignTypeForMethod](./metadata.metadatainspector.getdesigntypeformethod.md)

## MetadataInspector.getDesignTypeForMethod() method

Get TypeScript design time type for a method.

**Signature:**

```typescript
static getDesignTypeForMethod(target: Object, methodName: string): DesignTimeMethodMetadata | undefined;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

target


</td><td>

Object


</td><td>

Class or prototype


</td></tr>
<tr><td>

methodName


</td><td>

string


</td><td>

Method name


</td></tr>
</tbody></table>
**Returns:**

[DesignTimeMethodMetadata](./metadata.designtimemethodmetadata.md) \| undefined

Design time metadata. The return value is `undefined` in projects that do not enable `emitDecoratorMetadata` in TypeScript compiler options or are written in vanilla JavaScript.


