UNPKG

@tsclean/core

Version:

Plugin for API Rest Full development, based on Clean Architecture, IoC and Dependency Injection.

54 lines 3.26 kB
import { ApplicationConfig } from '../../app'; import { ModuleCompiler } from './compiler'; import { ContextId } from './instance-wrapper'; import { Module } from './module'; import { ModuleTokenFactory } from './module-token-factory'; import { ModulesContainer } from './modules-container'; import { DynamicModuleInterface, Type } from '../../contracts'; import { EnhancerSubtype } from '../../helpers'; import { InjectableType, ProviderType } from '../../types'; import { SerializedGraph } from '../../inspector/serialized-graph'; export declare class ContainerIoC { private readonly _applicationConfig; private readonly globalModules; private readonly moduleTokenFactory; private readonly moduleCompiler; private readonly modules; private readonly dynamicModulesMetadata; private readonly internalProvidersStorage; private readonly _serializedGraph; private internalCoreModule; constructor(_applicationConfig?: ApplicationConfig); get serializedGraph(): SerializedGraph; get applicationConfig(): ApplicationConfig | undefined; setHttpAdapter(httpAdapter: any): void; getHttpAdapterRef(): import("..").AbstractHttpAdapter<any, any, any>; getHttpAdapterHostRef(): import("../../helpers").HttpAdapterHost<import("..").AbstractHttpAdapter<any, any, any>>; addModule(metaType: Type<any> | DynamicModuleInterface | Promise<DynamicModuleInterface>, scope: Type<any>[]): Promise<Module | undefined>; addDynamicMetadata(token: string, dynamicModuleMetadata: Partial<DynamicModuleInterface>, scope: Type<any>[]): Promise<void>; addDynamicModules(modules: any[], scope: Type<any>[]): Promise<void>; isGlobalModule(metatype: Type<any>, dynamicMetadata?: Partial<DynamicModuleInterface>): boolean; addGlobalModule(module: Module): void; getModules(): ModulesContainer; getModuleCompiler(): ModuleCompiler; getModuleByKey(moduleKey: string): Module; getInternalCoreModuleRef(): Module | undefined; addImport(relatedModule: Type<any> | DynamicModuleInterface, token: string): Promise<void>; addProvider(provider: ProviderType, token: string, enhancerSubtype?: EnhancerSubtype): string | symbol | Function; addInjectable(injectable: ProviderType, token: string, enhancerSubtype: EnhancerSubtype, host?: Type<InjectableType>): string | symbol | Function | Type<any> | import("../../contracts").AbstractInterface<any>; addExportedProvider(provider: Type<any>, token: string): void; addController(controller: Type<any>, token: string): void; clear(): void; replace(toReplace: any, options: any & { scope: any[] | null; }): void; bindGlobalScope(): void; bindGlobalsToImports(moduleRef: Module): void; bindGlobalModuleToModule(target: Module, globalModule: Module): void; getDynamicMetadataByToken(token: string): Partial<DynamicModuleInterface>; getDynamicMetadataByToken<K extends Exclude<keyof DynamicModuleInterface, 'global' | 'module'>>(token: string, metadataKey: K): DynamicModuleInterface[K]; registerCoreModuleRef(moduleRef: Module): void; getModuleTokenFactory(): ModuleTokenFactory; registerRequestProvider<T = any>(request: T, contextId: ContextId): void; } //# sourceMappingURL=container.d.ts.map