# flatten

**Kind:** Function

**Source:** [`packages/common/decorators/core/dependencies.decorator.ts`](https://github.com/nestjs/nest/blob/master/packages/common/decorators/core/dependencies.decorator.ts#L3)

**Part of:** [Common](subsystem-packages-common)

## Signature

```ts
function flatten(arr: T): T extends Array<infer R> ? R : never
```

## Parameters

| Name | Type |
|---|---|
| `arr` | `T` |

**Returns:** `T extends Array<infer R> ? R : never`

## Used by

2 references from 2 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Imported by (2)

- `RoutePathFactory` — `packages/core/router/route-path-factory.ts`:18
- `FilterByInclude` — `packages/core/discovery/discovery-service.ts`:16
