1 | import { INestApplication, INestApplicationContext, INestMicroservice } from '@nestjs/common';
|
2 | import { NestMicroserviceOptions } from '@nestjs/common/interfaces/microservices/nest-microservice-options.interface';
|
3 | import { NestApplicationContextOptions } from '@nestjs/common/interfaces/nest-application-context-options.interface';
|
4 | import { NestApplicationOptions } from '@nestjs/common/interfaces/nest-application-options.interface';
|
5 | import { AbstractHttpAdapter } from './adapters/http-adapter';
|
6 |
|
7 |
|
8 |
|
9 | export declare class NestFactoryStatic {
|
10 | private readonly logger;
|
11 | |
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | create<T extends INestApplication = INestApplication>(module: any, options?: NestApplicationOptions): Promise<T>;
|
21 | /**
|
22 | * Creates an instance of NestApplication with the specified `httpAdapter`.
|
23 | *
|
24 | * @param module Entry (root) application module class
|
25 | * @param httpAdapter Adapter to proxy the request/response cycle to
|
26 | * the underlying HTTP server
|
27 | * @param options List of options to initialize NestApplication
|
28 | *
|
29 | * @returns A promise that, when resolved,
|
30 | * contains a reference to the NestApplication instance.
|
31 | */
|
32 | create<T extends INestApplication = INestApplication>(module: any, httpAdapter: AbstractHttpAdapter, options?: NestApplicationOptions): Promise<T>;
|
33 | /**
|
34 | * Creates an instance of NestMicroservice.
|
35 | *
|
36 | * @param module Entry (root) application module class
|
37 | * @param options Optional microservice configuration
|
38 | *
|
39 | * @returns A promise that, when resolved,
|
40 | * contains a reference to the NestMicroservice instance.
|
41 | */
|
42 | createMicroservice<T extends object>(module: any, options?: NestMicroserviceOptions & T): Promise<INestMicroservice>;
|
43 | /**
|
44 | * Creates an instance of NestApplicationContext.
|
45 | *
|
46 | * @param module Entry (root) application module class
|
47 | * @param options Optional Nest application configuration
|
48 | *
|
49 | * @returns A promise that, when resolved,
|
50 | * contains a reference to the NestApplicationContext instance.
|
51 | */
|
52 | createApplicationContext(module: any, options?: NestApplicationContextOptions): Promise<INestApplicationContext>;
|
53 | private createNestInstance;
|
54 | private initialize;
|
55 | private createProxy;
|
56 | private createExceptionProxy;
|
57 | private createExceptionZone;
|
58 | private applyLogger;
|
59 | private createHttpAdapter;
|
60 | private isHttpServer;
|
61 | private createAdapterProxy;
|
62 | }
|
63 | /**
|
64 | * Use NestFactory to create an application instance.
|
65 | *
|
66 | * ### Specifying an entry module
|
67 | *
|
68 | * Pass the required *root module* for the application via the module parameter.
|
69 | * By convention, it is usually called `ApplicationModule`. Starting with this
|
70 | * module, Nest assembles the dependency graph and begins the process of
|
71 | * Dependency Injection and instantiates the classes needed to launch your
|
72 | * application.
|
73 | *
|
74 | * @publicApi
|
75 | */
|
76 | export declare const NestFactory: NestFactoryStatic;
|