---
meta:
 - name: keywords
   description: api typescript node.js documentation ProviderType enum
---
# ProviderType - @tsed/di

## Usage

```typescript
import { ProviderType } from "@tsed/di";
```

> See [/packages/di/src/common/domain/ProviderType.ts](https://github.com/tsedio/tsed/blob/v8.27.0/packages/di/src/common/domain/ProviderType.ts#L0-L0).

## Overview

```ts
enum ProviderType {
    VALUE = "value",
    PROVIDER = "provider",
    MODULE = "module",
    CONTROLLER = "controller",
    INTERCEPTOR = "interceptor",
    MIDDLEWARE = "middleware"
}
```

<!-- Description -->

## Description

Enumeration categorizing different types of providers in the DI system.

Used to classify and filter providers based on their role in the application architecture.
Each type represents a distinct pattern or responsibility within the framework.

### Types

-   `VALUE`: Simple value providers (constants, configuration)
-   `PROVIDER`: Standard service providers
-   `MODULE`: Module providers organizing related functionality
-   `CONTROLLER`: HTTP route controllers
-   `INTERCEPTOR`: Method interceptors for cross-cutting concerns
-   `MIDDLEWARE`: Request/response middleware

### Usage

```typescript
import {ProviderType} from "@tsed/di";

const providers = container.getProviders(ProviderType.CONTROLLER);
```

<!-- Members -->

## VALUE

```ts
VALUE = "value",
```

## PROVIDER

```ts
PROVIDER = "provider",
```

## MODULE

```ts
MODULE = "module",
```

## CONTROLLER

```ts
CONTROLLER = "controller",
```

## INTERCEPTOR

```ts
INTERCEPTOR = "interceptor",
```

## MIDDLEWARE

```ts
MIDDLEWARE = "middleware"
```
