UNPKG

@loopback/docs

Version:

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

114 lines (59 loc) 2.27 kB
--- lang: en title: 'API docs: metadata.methodparameterdecoratorfactory' 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.methodparameterdecoratorfactory.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/metadata](./metadata.md) &gt; [MethodParameterDecoratorFactory](./metadata.methodparameterdecoratorfactory.md) ## MethodParameterDecoratorFactory class Factory for method level parameter decorator. **Signature:** ```typescript export declare class MethodParameterDecoratorFactory<T> extends DecoratorFactory<T, MetadataMap<T[]>, MethodDecorator> ``` **Extends:** [DecoratorFactory](./metadata.decoratorfactory.md)<!-- -->&lt;T, [MetadataMap](./metadata.metadatamap.md)<!-- -->&lt;T\[\]&gt;, MethodDecorator&gt; ## Example For example, the following code uses `@param` to declare two parameters for `greet()`<!-- -->. ```ts class MyController { @param('name') // Parameter 0 @param('msg') // Parameter 1 greet() {} } ``` ## Methods <table><thead><tr><th> Method </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> [create()](./metadata.methodparameterdecoratorfactory.create.md) </td><td markdown="1"> </td><td markdown="1"> </td></tr> <tr><td markdown="1"> [createDecorator(key, spec, options)](./metadata.methodparameterdecoratorfactory.createdecorator.md) </td><td markdown="1"> `static` </td><td markdown="1"> Create a method decorator function </td></tr> <tr><td markdown="1"> [mergeWithInherited(inheritedMetadata, target, methodName, methodDescriptor)](./metadata.methodparameterdecoratorfactory.mergewithinherited.md) </td><td markdown="1"> `protected` </td><td markdown="1"> </td></tr> <tr><td markdown="1"> [mergeWithOwn(ownMetadata, target, methodName, methodDescriptor)](./metadata.methodparameterdecoratorfactory.mergewithown.md) </td><td markdown="1"> `protected` </td><td markdown="1"> </td></tr> </tbody></table>