Skip to content

DIConfiguration

@tsed/di

Usage

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

See /packages/di/src/types/common/services/DIConfiguration.ts.

Overview

ts
class DIConfiguration {
    readonly default: Map<string, any>;
    protected map: Map<string, any>;
    constructor(initialProps?: {});
    get version(): string;
    set version(v: string);
    get rootDir(): string;
    set rootDir(value: string);
    get env(): Env;
    set env(value: Env);
    get imports(): (TokenProvider | ImportTokenProviderOpts)[];
    set imports(imports: (TokenProvider | ImportTokenProviderOpts)[]);
    get routes(): TokenRoute[];
    set routes(routes: TokenRoute[]);
    get logger(): Partial<DILoggerOptions>;
    set logger(value: Partial<DILoggerOptions>);
    get debug(): boolean;
    set debug(debug: boolean);
    forEach(callbackfn: (value: any, index: string, map: Map<string, any>) => void, thisArg?: any): void;
    set(propertyKey: string | Partial<TsED.Configuration>, value?: any): this;
    setRaw(propertyKey: string, value: any): this;
    get<T = any>(propertyKey: string, defaultValue?: T): T;
    protected getRaw(propertyKey: string, defaultValue?: any): any;
}

readonly default

ts
readonly default: Map<string, any>;

protected map

ts
protected map: Map<string, any>;

get version

ts
get version(): string;

set version

ts
set version(v: string);

get rootDir

ts
get rootDir(): string;

set rootDir

ts
set rootDir(value: string);

get env

ts
get env(): Env;

set env

ts
set env(value: Env);

get imports

ts
get imports(): (TokenProvider | ImportTokenProviderOpts)[];

set imports

ts
set imports(imports: (TokenProvider | ImportTokenProviderOpts)[]);

get routes

ts
get routes(): TokenRoute[];

set routes

ts
set routes(routes: TokenRoute[]);

get logger

ts
get logger(): Partial<DILoggerOptions>;

set logger

ts
set logger(value: Partial<DILoggerOptions>);

get debug

ts
get debug(): boolean;

set debug

ts
set debug(debug: boolean);

forEach

ts
forEach(callbackfn: (value: any, index: string, map: Map<string, any>) => void, thisArg?: any): void;

set

ts
set(propertyKey: string | Partial<TsED.Configuration>, value?: any): this;

setRaw

ts
setRaw(propertyKey: string, value: any): this;

get

ts
get<T = any>(propertyKey: string, defaultValue?: T): T;

protected getRaw

ts
protected getRaw(propertyKey: string, defaultValue?: any): any;

Released under the MIT License.