@@ -9,48 +9,48 @@ export interface INestApplication extends INestApplicationContext {
99 *
1010 * @returns Promise
1111 */
12- init ( ) : Promise < void > ;
12+ init ( ) : Promise < this > ;
1313 /**
1414 * A wrapper function around native `express.use()` method.
1515 * Example `app.use(cors())`
1616 *
1717 * @returns void
1818 */
19- use ( ...args : any [ ] ) : void ;
19+ use ( ...args : any [ ] ) : this ;
2020 /**
2121 * A wrapper function around native `express.set()` method.
2222 * Example `app.set('trust proxy', 'loopback')`
2323 *
2424 * @returns void
2525 */
26- set ( ...args : any [ ] ) : void ;
26+ set ( ...args : any [ ] ) : this ;
2727 /**
2828 * A wrapper function around native `express.engine()` method.
2929 * Example `app.engine('mustache', mustacheExpress())`
3030 *
3131 * @returns void
3232 */
33- engine ( ...args : any [ ] ) : void ;
33+ engine ( ...args : any [ ] ) : this ;
3434 /**
3535 * A wrapper function around native `express.enable()` method.
3636 * Example `app.enable('x-powered-by')`
3737 *
3838 * @returns void
3939 */
40- enable ( ...args : any [ ] ) : void ;
40+ enable ( ...args : any [ ] ) : this ;
4141 /**
4242 * Enables CORS (Cross-Origin Resource Sharing)
4343 *
4444 * @returns void
4545 */
46- enableCors ( ) : void ;
46+ enableCors ( ) : this ;
4747 /**
4848 * A wrapper function around native `express.disable()` method.
4949 * Example `app.disable('x-powered-by')`
5050 *
5151 * @returns void
5252 */
53- disable ( ...args : any [ ] ) : void ;
53+ disable ( ...args : any [ ] ) : this ;
5454 /**
5555 * Starts the application.
5656 *
@@ -75,15 +75,15 @@ export interface INestApplication extends INestApplicationContext {
7575 * @param {string } prefix The prefix for the every HTTP route path (for example `/v1/api`)
7676 * @returns void
7777 */
78- setGlobalPrefix ( prefix : string ) : void ;
78+ setGlobalPrefix ( prefix : string ) : this ;
7979 /**
8080 * Setup Web Sockets Adapter, which will be used inside Gateways.
8181 * Use, when you want to override default `socket.io` library.
8282 *
8383 * @param {WebSocketAdapter } adapter
8484 * @returns void
8585 */
86- useWebSocketAdapter ( adapter : WebSocketAdapter ) : void ;
86+ useWebSocketAdapter ( adapter : WebSocketAdapter ) : this ;
8787 /**
8888 * Connects microservice to the NestApplication instance. It transforms application to the hybrid instance.
8989 *
@@ -109,7 +109,7 @@ export interface INestApplication extends INestApplicationContext {
109109 * @param {Function } callback Optional callback function
110110 * @returns void
111111 */
112- startAllMicroservices ( callback ?: ( ) => void ) : void ;
112+ startAllMicroservices ( callback ?: ( ) => void ) : this ;
113113 /**
114114 * Starts all the connected microservices and can be awaited
115115 *
@@ -121,25 +121,25 @@ export interface INestApplication extends INestApplicationContext {
121121 *
122122 * @param {ExceptionFilter[] } ...filters
123123 */
124- useGlobalFilters ( ...filters : ExceptionFilter [ ] ) : any ;
124+ useGlobalFilters ( ...filters : ExceptionFilter [ ] ) : this ;
125125 /**
126126 * Setups pipes as a global pipes (will be used within every HTTP route handler)
127127 *
128128 * @param {PipeTransform[] } ...pipes
129129 */
130- useGlobalPipes ( ...pipes : PipeTransform < any > [ ] ) : any ;
130+ useGlobalPipes ( ...pipes : PipeTransform < any > [ ] ) : this ;
131131 /**
132132 * Setups interceptors as a global interceptors (will be used within every HTTP route handler)
133133 *
134134 * @param {NestInterceptor[] } ...interceptors
135135 */
136- useGlobalInterceptors ( ...interceptors : NestInterceptor [ ] ) : any ;
136+ useGlobalInterceptors ( ...interceptors : NestInterceptor [ ] ) : this ;
137137 /**
138138 * Setups guards as a global guards (will be used within every HTTP route handler)
139139 *
140140 * @param {CanActivate[] } ...guards
141141 */
142- useGlobalGuards ( ...guards : CanActivate [ ] ) : any ;
142+ useGlobalGuards ( ...guards : CanActivate [ ] ) : this ;
143143 /**
144144 * Terminates the application (both NestApplication, Web Socket Gateways and every connected microservice)
145145 *
0 commit comments