---
lang: en
title: 'API docs: metadata.decoratorfactory.getnumberofparameters'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.metadata.decoratorfactory.getnumberofparameters.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/metadata](./metadata.md) &gt; [DecoratorFactory](./metadata.decoratorfactory.md) &gt; [getNumberOfParameters](./metadata.decoratorfactory.getnumberofparameters.md)

## DecoratorFactory.getNumberOfParameters() method

Get the number of parameters for a given constructor or method

<b>Signature:</b>

```typescript
static getNumberOfParameters(target: Object, member?: string): number;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  target | <code>Object</code> | Class or the prototype |
|  member | <code>string</code> | Method name |

<b>Returns:</b>

`number`


