# 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[]);
/**
*
* @param callbackfn
* @param thisArg
*/
forEach(callbackfn: (value: any, index: string, map: Map<string, any>) => void, thisArg?: any): void;
/**
*
* @param propertyKey
* @param value
*/
set(propertyKey: string | Partial<TsED.Configuration>, value?: any): this;
setRaw(propertyKey: string, value: any): this;
/**
*
* @param propertyKey
* @returns {undefined|any}
*/
get<T = any>(propertyKey: string): T;
getRaw(propertyKey: string): any;
merge(obj: Partial<TsED.Configuration>): void;
/**
*
* @param value
* @returns {any}
*/
resolve(value: any): any;
build(): void;
}
# 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): T;
getRaw(propertyKey: string): any;
merge(obj: Partial<TsED.Configuration>): void;
resolve(value: any): any;
build(): void;
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Jest
- Seq
- Controllers
- Providers
- Model
- Converters
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing