Skip to content

ModuleOptions

@tsed/di

Usage

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

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

Overview

ts
interface ModuleOptions extends Omit<TsED.Configuration, "scopes"> {
    scope?: ProviderScope;
    imports?: TokenProvider[];
    deps?: TokenProvider[];
    [key: string]: any;
}

scope

ts
scope?: ProviderScope;

Provider scope

imports

ts
imports?: TokenProvider[];

Providers must be initialized before building this module

deps

ts
deps?: TokenProvider[];

Explicit token must be injected in the constructor

[key: string]

ts
[key: string]: any;

Additional properties are stored as provider configuration.

Released under the MIT License.