Skip to content

Commit

Permalink
chore(fastify): undeprecate listen method
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Nov 5, 2024
1 parent 7843db3 commit c6b95f5
Showing 1 changed file with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { INestApplication, HttpServer } from '@nestjs/common';
import { HttpServer, INestApplication } from '@nestjs/common';
import {
FastifyBodyParser,
FastifyInstance,
Expand All @@ -7,14 +7,14 @@ import {
FastifyPluginCallback,
FastifyPluginOptions,
FastifyRegisterOptions,
FastifyRequest,
FastifyReply,
FastifyRequest,
RawServerBase,
RawServerDefault,
} from 'fastify';
import {
Chain as LightMyRequestChain,
InjectOptions,
Chain as LightMyRequestChain,
Response as LightMyRequestResponse,
} from 'light-my-request';
import { FastifyStaticOptions, FastifyViewOptions } from './external';
Expand Down Expand Up @@ -98,33 +98,19 @@ export interface NestFastifyApplication<
opts: FastifyListenOptions,
callback?: (err: Error | null, address: string) => void,
): Promise<TServer>;
listen(
opts?: FastifyListenOptions,
): Promise<TServer>;
listen(opts?: FastifyListenOptions): Promise<TServer>;
listen(
callback?: (err: Error | null, address: string) => void,
): Promise<TServer>;
/**
* @deprecated Variadic listen method is deprecated. Please use `.listen(optionsObject, callback)` instead. The variadic signature will be removed in `fastify@5`
* @see https://github.com/fastify/fastify/pull/3712
*/
listen(
port: number | string,
callback?: (err: Error | null, address: string) => void,
): Promise<TServer>;
/**
* @deprecated Variadic listen method is deprecated. Please use `.listen(optionsObject, callback)` instead. The variadic signature will be removed in `fastify@5`
* @see https://github.com/fastify/fastify/pull/3712
*/
listen(
port: number | string,
address: string,
callback?: (err: Error | null, address: string) => void,
): Promise<TServer>;
/**
* @deprecated Variadic listen method is deprecated. Please use `.listen(optionsObject, callback)` instead. The variadic signature will be removed in `fastify@5`
* @see https://github.com/fastify/fastify/pull/3712
*/
listen(
port: number | string,
address: string,
Expand Down

0 comments on commit c6b95f5

Please sign in to comment.