UNPKG

@loopback/docs

Version:

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

38 lines (24 loc) 1.33 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 | Parameter | Type | Description | | --- | --- | --- | | target | Object | Class or prototype | | methodName | string | Method name | **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.