# Class DIConfiguration

Class
Module
import { DIConfiguration } from "@tsed/di"
Source/packages/di/src/services/DIConfiguration.ts

# Overview

class DIConfiguration {
    readonly default: Map<string, any>;
    protected map: Map<string, any>;
    [key: string]: any;
    constructor(initialProps?: {});
    get scopes(): {
        [key: string]: ProviderScope;
    };
    set scopes(value: {
        [key: string]: ProviderScope;
    });
    get resolvers(): IDIResolver[];
    set resolvers(resolvers: IDIResolver[]);
    get imports(): TokenProvider[];
    set imports(imports: TokenProvider[]);
<span class="token function">forEach</span><span class="token punctuation">(</span>callbackfn<span class="token punctuation">:</span> <span class="token punctuation">(</span>value<span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">,</span> index<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">,</span> map<span class="token punctuation">:</span> Map&lt;<span class="token keyword">string</span><span class="token punctuation">,</span> <span class="token keyword">any</span>&gt;<span class="token punctuation">)</span> =&gt; <span class="token keyword">void</span><span class="token punctuation">,</span> thisArg?<span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token keyword">void</span><span class="token punctuation">;</span>

<span class="token function">set</span><span class="token punctuation">(</span>propertyKey<span class="token punctuation">:</span> <span class="token keyword">string</span> | Partial&lt;TsED.<a href="/api/di/decorators/Configuration.html"><span class="token">Configuration</span></a>&gt;<span class="token punctuation">,</span> value?<span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">)</span><span class="token punctuation">:</span> this<span class="token punctuation">;</span>
<span class="token function">setRaw</span><span class="token punctuation">(</span>propertyKey<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">,</span> value<span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">)</span><span class="token punctuation">:</span> this<span class="token punctuation">;</span>

get&lt;T<span class="token punctuation"> = </span><span class="token keyword">any</span>&gt;<span class="token punctuation">(</span>propertyKey<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">,</span> defaultValue?<span class="token punctuation">:</span> T<span class="token punctuation">)</span><span class="token punctuation">:</span> T<span class="token punctuation">;</span>
<span class="token function">getRaw</span><span class="token punctuation">(</span>propertyKey<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">,</span> defaultValue?<span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">;</span>
<span class="token function">merge</span><span class="token punctuation">(</span>obj<span class="token punctuation">:</span> Partial&lt;TsED.<a href="/api/di/decorators/Configuration.html"><span class="token">Configuration</span></a>&gt;<span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token keyword">void</span><span class="token punctuation">;</span>

<span class="token function">resolve</span><span class="token punctuation">(</span>value<span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">;</span>
<span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token keyword">void</span><span class="token punctuation">;</span>

}

# Members

readonly default: Map<string, any>;

protected map: Map<string, any>;

[key: string]: any;

get scopes(): {
     [key: string]: ProviderScope;
 };

set scopes(value: {
     [key: string]: ProviderScope;
 });

get resolvers(): IDIResolver[];

set resolvers(resolvers: IDIResolver[]);

get imports(): TokenProvider[];

set imports(imports: TokenProvider[]);

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;

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

merge(obj: Partial<TsED.Configuration>): void;

resolve(value: any): any;

build(): void;

Other topics