UNPKG

@loopback/docs

Version:

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

38 lines (25 loc) 1.45 kB
--- lang: en title: 'API docs: metadata.metadatainspector.getmethodmetadata' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/strongloop/loopback-next/tree/master/packages/metadata permalink: /doc/en/lb4/apidocs.metadata.metadatainspector.getmethodmetadata.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; [getMethodMetadata](./metadata.metadatainspector.getmethodmetadata.md) ## MetadataInspector.getMethodMetadata() method Get the metadata associated with the given key for a given method of the target class or prototype <b>Signature:</b> ```typescript static getMethodMetadata<T>(key: MetadataKey<T, MethodDecorator>, target: Object, methodName?: string, options?: InspectionOptions): T | undefined; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | key | [MetadataKey](./metadata.metadatakey.md)<!-- -->&lt;T, MethodDecorator&gt; | Metadata key | | target | Object | Class for static methods or prototype for instance methods | | methodName | string | Method name. If not present, default to '' to use the constructor | | options | [InspectionOptions](./metadata.inspectionoptions.md) | Options for inspection | <b>Returns:</b> T \| undefined