---
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.

<b>Signature:</b>

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

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  target | Object | Class or prototype |
|  methodName | string | Method name |

<b>Returns:</b>

[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.


