1 | import { INestApplicationContext, LoggerService, LogLevel, ShutdownSignal } from '@nestjs/common';
|
2 | import { Abstract, DynamicModule } from '@nestjs/common/interfaces';
|
3 | import { Type } from '@nestjs/common/interfaces/type.interface';
|
4 | import { NestContainer } from './injector/container';
|
5 | import { Injector } from './injector/injector';
|
6 | import { ContextId } from './injector/instance-wrapper';
|
7 | import { Module } from './injector/module';
|
8 |
|
9 |
|
10 |
|
11 | export declare class NestApplicationContext implements INestApplicationContext {
|
12 | protected readonly container: NestContainer;
|
13 | private readonly scope;
|
14 | private contextModule;
|
15 | protected isInitialized: boolean;
|
16 | protected readonly injector: Injector;
|
17 | private readonly activeShutdownSignals;
|
18 | private readonly moduleCompiler;
|
19 | private shutdownCleanupRef?;
|
20 | private _instanceLinksHost;
|
21 | private _moduleRefsByDistance?;
|
22 | private get instanceLinksHost();
|
23 | constructor(container: NestContainer, scope?: Type<any>[], contextModule?: Module);
|
24 | selectContextModule(): void;
|
25 | select<T>(moduleType: Type<T> | DynamicModule): INestApplicationContext;
|
26 | get<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | Abstract<TInput> | string | symbol, options?: {
|
27 | strict: boolean;
|
28 | }): TResult;
|
29 | resolve<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | Abstract<TInput> | string | symbol, contextId?: ContextId, options?: {
|
30 | strict: boolean;
|
31 | }): Promise<TResult>;
|
32 | registerRequestByContextId<T = any>(request: T, contextId: ContextId): void;
|
33 | /**
|
34 | * Initalizes the Nest application.
|
35 | * Calls the Nest lifecycle events.
|
36 | *
|
37 | * @returns {Promise<this>} The NestApplicationContext instance as Promise
|
38 | */
|
39 | init(): Promise<this>;
|
40 | close(): Promise<void>;
|
41 | useLogger(logger: LoggerService | LogLevel[] | false): void;
|
42 | flushLogs(): void;
|
43 | |
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 | enableShutdownHooks(signals?: (ShutdownSignal | string)[]): this;
|
53 | protected dispose(): Promise<void>;
|
54 | |
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | protected listenToShutdownSignals(signals: string[]): void;
|
61 | |
62 |
|
63 |
|
64 | protected unsubscribeFromProcessSignals(): void;
|
65 | |
66 |
|
67 |
|
68 |
|
69 | protected callInitHook(): Promise<void>;
|
70 | |
71 |
|
72 |
|
73 |
|
74 | protected callDestroyHook(): Promise<void>;
|
75 | |
76 |
|
77 |
|
78 |
|
79 | protected callBootstrapHook(): Promise<void>;
|
80 | |
81 |
|
82 |
|
83 |
|
84 | protected callShutdownHook(signal?: string): Promise<void>;
|
85 | |
86 |
|
87 |
|
88 |
|
89 | protected callBeforeShutdownHook(signal?: string): Promise<void>;
|
90 | protected find<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | Abstract<TInput> | string | symbol, contextModule?: Module): TResult;
|
91 | protected resolvePerContext<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | Abstract<TInput> | string | symbol, contextModule: Module, contextId: ContextId, options?: {
|
92 | strict: boolean;
|
93 | }): Promise<TResult>;
|
94 | private getModulesSortedByDistance;
|
95 | }
|