UNPKG

@loopback/docs

Version:

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

276 lines (126 loc) 4.67 kB
--- lang: en title: 'API docs: metadata.metadatainspector' 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.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) ## MetadataInspector class Inspector for metadata applied by decorators **Signature:** ```typescript export declare class MetadataInspector ``` ## Properties <table><thead><tr><th> Property </th><th> Modifiers </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> [DesignTimeReflector](./metadata.metadatainspector.designtimereflector.md) </td><td markdown="1"> `static` `readonly` </td><td markdown="1"> [NamespacedReflect](./metadata.namespacedreflect.md) </td><td markdown="1"> Expose the reflector for TypeScript design-time metadata </td></tr> <tr><td markdown="1"> [Reflector](./metadata.metadatainspector.reflector.md) </td><td markdown="1"> `static` `readonly` </td><td markdown="1"> [NamespacedReflect](./metadata.namespacedreflect.md) </td><td markdown="1"> Expose Reflector, which is a wrapper of `Reflect` and it uses `loopback` as the namespace prefix for all metadata keys </td></tr> </tbody></table> ## Methods <table><thead><tr><th> Method </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> [defineMetadata(key, value, target, member)](./metadata.metadatainspector.definemetadata.md) </td><td markdown="1"> `static` </td><td markdown="1"> Define metadata for the given target </td></tr> <tr><td markdown="1"> [getAllMethodMetadata(key, target, options)](./metadata.metadatainspector.getallmethodmetadata.md) </td><td markdown="1"> `static` </td><td markdown="1"> Get the metadata associated with the given key for all methods of the target class or prototype </td></tr> <tr><td markdown="1"> [getAllParameterMetadata(key, target, methodName, options)](./metadata.metadatainspector.getallparametermetadata.md) </td><td markdown="1"> `static` </td><td markdown="1"> Get the metadata associated with the given key for all parameters of a given method </td></tr> <tr><td markdown="1"> [getAllPropertyMetadata(key, target, options)](./metadata.metadatainspector.getallpropertymetadata.md) </td><td markdown="1"> `static` </td><td markdown="1"> Get the metadata associated with the given key for all properties of the target class or prototype </td></tr> <tr><td markdown="1"> [getClassMetadata(key, target, options)](./metadata.metadatainspector.getclassmetadata.md) </td><td markdown="1"> `static` </td><td markdown="1"> Get the metadata associated with the given key for a given class </td></tr> <tr><td markdown="1"> [getDesignTypeForMethod(target, methodName)](./metadata.metadatainspector.getdesigntypeformethod.md) </td><td markdown="1"> `static` </td><td markdown="1"> Get TypeScript design time type for a method. </td></tr> <tr><td markdown="1"> [getDesignTypeForProperty(target, propertyName)](./metadata.metadatainspector.getdesigntypeforproperty.md) </td><td markdown="1"> `static` </td><td markdown="1"> Get TypeScript design time type for a property </td></tr> <tr><td markdown="1"> [getMethodMetadata(key, target, methodName, options)](./metadata.metadatainspector.getmethodmetadata.md) </td><td markdown="1"> `static` </td><td markdown="1"> Get the metadata associated with the given key for a given method of the target class or prototype </td></tr> <tr><td markdown="1"> [getParameterMetadata(key, target, methodName, index, options)](./metadata.metadatainspector.getparametermetadata.md) </td><td markdown="1"> `static` </td><td markdown="1"> Get the metadata associated with the given key for a parameter of a given method by index </td></tr> <tr><td markdown="1"> [getPropertyMetadata(key, target, propertyName, options)](./metadata.metadatainspector.getpropertymetadata.md) </td><td markdown="1"> `static` </td><td markdown="1"> Get the metadata associated with the given key for a given property of the target class or prototype </td></tr> </tbody></table>