Skip to content

injector

@tsed/di

Usage

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

See /packages/di/src/types/common/fn/injector.ts.

Overview

ts
function injector(): InjectorService;

Description

Return the existing injector service.

Example:

typescript
import {injector, Injectable} from "@tsed/di";

@Injectable()
class MyService {
  injector = injector();
}

Released under the MIT License.