Files
common/README.md
2026-01-12 13:23:12 +01:00

40 lines
1.1 KiB
Markdown

# @alveojs/common
Internal shared library for the Alveo Dependency Injection framework.
## Description
This package contains the common types, decorators, interfaces, and utilities used by the Alveo ecosystem. It is designed to be a lightweight dependency that allows third-party packages or plugins to integrate with Alveo without requiring the full DI engine.
## Contents
- **Decorators**: `@Injectable()`, `@Module()`, `@Inject()`
- **Lifecycle Interfaces**: `OnModuleInit`, `OnApplicationBootstrap`, `OnModuleDestroy`, etc.
- **Provider Interfaces**: Definitions for Class, Value, Factory, and Existing providers.
- **Utilities**: `forwardRef()` for circular dependency resolution.
- **Base Classes**: Core error classes and base types.
## Installation
```bash
bun add @alveojs/common
# or
npm install @alveojs/common
```
## Usage
This package is typically used when building libraries or modules that will be consumed by an Alveo application.
```typescript
import { Injectable } from '@alveojs/common';
@Injectable()
export class MyService {
// ...
}
```
## License
MIT