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