---
url: /api/di/types/common/domain/enum-provider-type.md
description: api documentation of ProviderType from @tsed/di
---

## Usage

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

> See [/packages/di/src/common/domain/ProviderType.ts](https://github.com/tsedio/tsed/blob/v8.38.5/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

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);
```

## VALUE

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

## PROVIDER

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

## MODULE

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

## CONTROLLER

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

## INTERCEPTOR

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

## MIDDLEWARE

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