# @eyjs/di

Dependency Injection container for the EyJS framework.

## Features

- 🎯 **Type-safe dependency injection** with decorators
- 🔄 **Automatic dependency resolution** 
- 📦 **Container management** with singleton and transient scopes
- 🏷️ **Metadata registry** for reflection-based injection
- ⚡ **Zero runtime overhead** with TypeScript decorators

## Installation

```bash
bun add @eyjs/di
```

## Usage

```typescript
import { Injectable, Inject, Container } from '@eyjs/di';

@Injectable()
class UserService {
  async findUser(id: string) {
    // Implementation
  }
}

@Injectable()
class UserController {
  constructor(
    @Inject(UserService) private userService: UserService
  ) {}

  async getUser(id: string) {
    return this.userService.findUser(id);
  }
}

// Usage
const container = new Container();
const controller = container.get(UserController);
```

## API

- `@Injectable()` - Marks a class as injectable
- `@Inject(token)` - Injects a dependency by token
- `Container` - Main DI container class
- `MetadataRegistry` - Manages reflection metadata

## Dependencies

- `reflect-metadata` - For reflection support
- `typescript` - Peer dependency for decorators
