/core

Dependency injection and auto configuration, core component for the rest @t2ee projects.

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Introduction

This projects aims to be foundation component for the rest of @t2ee projects. It provides dependency injection and auto configuration functionalities.

For detailed introduction and examples, please visit core.t2ee.org.

Installation

npm i reflect-metadata @t2ee/core -S

Example

@Component({ scope: new SingletonScope() })
class BootstrapTime {
    date: new Date();
}

@Component
class Main {
    @AutoWired
    programStartedAt: BootstrapTime
}