UNPKG

@tsclean/core

Version:

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

30 lines 1.88 kB
import { ContainerIoC, Injector, InstanceLinksHost, ContextId, Module, AbstractInstanceResolver } from '../core'; import { AbstractInterface, DynamicModuleInterface, ApplicationContextInterface, Type, ApplicationContextOptionsInterface, GetOrResolveOptions } from '../contracts'; import { Logger, LoggerService, LogLevel } from '../services'; export declare class ApplicationContext<TOptions extends ApplicationContextOptionsInterface = ApplicationContextOptionsInterface> extends AbstractInstanceResolver implements ApplicationContextInterface { protected readonly container: ContainerIoC; protected readonly appOptions: TOptions; private readonly scope; private contextModule; protected isInitialized: boolean; protected injector: Injector; protected readonly logger: Logger; private shouldFlushLogsOnOverride; private readonly moduleCompiler; private _instanceLinksHost; get instanceLinksHost(): InstanceLinksHost; constructor(container: ContainerIoC, appOptions?: TOptions, scope?: Type<any>[], contextModule?: Module); selectContextModule(): void; select<T>(moduleType: Type<T> | DynamicModuleInterface): ApplicationContextInterface; get<T = any, R = T>(typeOrToken: Type<T> | AbstractInterface<T> | string | symbol, options?: GetOrResolveOptions): R | Array<R>; resolve<T = any, R = T>(typeOrToken: Type<T> | AbstractInterface<T> | string | symbol, contextId?: ContextId, options?: GetOrResolveOptions): Promise<R | Array<R>>; registerRequestByContextId<T = any>(request: T, contextId: ContextId): void; init(): Promise<this>; close(): Promise<void>; useLogger(logger: LoggerService | LogLevel[] | false): void; flushLogs(): void; flushLogsOnOverride(): void; protected dispose(): Promise<void>; private printInPreviewModeWarning; } //# sourceMappingURL=application-context.d.ts.map