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