UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

83 lines (42 loc) 1.59 kB
--- 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 markdown="1"> target </td><td markdown="1"> Object </td><td markdown="1"> Class or prototype </td></tr> <tr><td markdown="1"> methodName </td><td markdown="1"> string </td><td markdown="1"> 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.