Skip to content

Service

@tsed/di

Usage

typescript
import { Service } from "@tsed/di";

See /packages/di/src/types/common/decorators/service.ts.

Overview

ts
function Service(): Function;

Description

The decorators @Service() a new service can be injected in other service or controller on there constructor. All services annotated with @Service() are constructed one time.

@Service() use the reflect-metadata to collect and inject service on controllers or other services.

Released under the MIT License.