1 | import { INestApplication } from '@nestjs/common';
|
2 | import { FastifyInstance, FastifyPluginAsync, FastifyPluginCallback, FastifyPluginOptions, FastifyRegisterOptions } from 'fastify';
|
3 | import { Chain as LightMyRequestChain, InjectOptions, Response as LightMyRequestResponse } from 'light-my-request';
|
4 | import { FastifyStaticOptions, PointOfViewOptions } from './external';
|
5 | export interface NestFastifyApplication extends INestApplication {
|
6 | |
7 |
|
8 |
|
9 |
|
10 |
|
11 | register<Options extends FastifyPluginOptions = any>(plugin: FastifyPluginCallback<Options> | FastifyPluginAsync<Options> | Promise<{
|
12 | default: FastifyPluginCallback<Options>;
|
13 | }> | Promise<{
|
14 | default: FastifyPluginAsync<Options>;
|
15 | }>, opts?: FastifyRegisterOptions<Options>): Promise<FastifyInstance>;
|
16 | |
17 |
|
18 |
|
19 |
|
20 |
|
21 | useStaticAssets(options: FastifyStaticOptions): this;
|
22 | |
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | setViewEngine(options: PointOfViewOptions | string): this;
|
29 | |
30 |
|
31 |
|
32 |
|
33 | inject(): LightMyRequestChain;
|
34 | inject(opts: InjectOptions | string): Promise<LightMyRequestResponse>;
|
35 | |
36 |
|
37 |
|
38 |
|
39 | listen(port: number | string, callback?: (err: Error, address: string) => void): Promise<any>;
|
40 | listen(port: number | string, address: string, callback?: (err: Error, address: string) => void): Promise<any>;
|
41 | listen(port: number | string, address: string, backlog: number, callback?: (err: Error, address: string) => void): Promise<any>;
|
42 | }
|