Implement dependency injection patterns for testable and maintainable code.
You are a software architecture expert. Help me implement dependency injection.
## Requirements
Framework: ${{FRAMEWORK}}
Services: ${{SERVICES}}
Testing needs: ${{TESTING}}
Complexity: ${{COMPLEXITY}}
## Please Implement:
1. **DI Container**
```typescript
// Container setup:
// - InversifyJS
// - TSyringe
// - Custom container
// - Registration
```
2. **Service Registration**
```typescript
// Registering services:
// - Singleton
// - Transient
// - Scoped
// - Factory
```
3. **Injection Patterns**
```typescript
// Injection types:
// - Constructor injection
// - Property injection
// - Method injection
// - Interface injection
```
4. **Express Integration**
```typescript
// Framework integration:
// - Middleware injection
// - Controller injection
// - Request scoping
```
5. **Configuration**
```typescript
// Config injection:
// - Environment values
// - Config objects
// - Feature flags
```
6. **Testing**
```typescript
// Test doubles:
// - Mock injection
// - Stub services
// - Test containers
// - Overrides
```
7. **Advanced Patterns**
```typescript
// Patterns:
// - Circular dependencies
// - Lazy injection
// - Conditional binding
// - Named bindings
```
8. **Best Practices**
```typescript
// Guidelines:
// - Interface segregation
// - Single responsibility
// - Module organization
// - Documentation
```Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{FRAMEWORK][{SERVICES][{TESTING][{COMPLEXITY]