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