Skip to content

Commit

Permalink
types: add forceCloseConnections type (#3646)
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS committed Jan 22, 2022
1 parent 70749bc commit 4928abc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions fastify.d.ts
Expand Up @@ -98,6 +98,7 @@ export type FastifyServerOptions<
connectionTimeout?: number,
keepAliveTimeout?: number,
maxRequestsPerSocket?: number,
forceCloseConnections?: boolean,
requestTimeout?: number,
pluginTimeout?: number,
bodyLimit?: number,
Expand Down
1 change: 1 addition & 0 deletions test/types/fastify.test-d.ts
Expand Up @@ -57,6 +57,7 @@ fastify({ http2: true, https: {} }).inject({}, lightMyRequestCallback)
expectAssignable<FastifyInstance<http2.Http2Server, http2.Http2ServerRequest, http2.Http2ServerResponse>>(fastify({ http2: true }))
expectAssignable<FastifyInstance>(fastify({ ignoreTrailingSlash: true }))
expectAssignable<FastifyInstance>(fastify({ connectionTimeout: 1000 }))
expectAssignable<FastifyInstance>(fastify({ forceCloseConnections: true }))
expectAssignable<FastifyInstance>(fastify({ keepAliveTimeout: 1000 }))
expectAssignable<FastifyInstance>(fastify({ pluginTimeout: 1000 }))
expectAssignable<FastifyInstance>(fastify({ bodyLimit: 100 }))
Expand Down
1 change: 1 addition & 0 deletions test/types/instance.test-d.ts
Expand Up @@ -171,6 +171,7 @@ type InitialConfig = Readonly<{
keepAliveTimeout?: number,
bodyLimit?: number,
caseSensitive?: boolean,
forceCloseConnections?: boolean,
http2?: boolean,
https?: boolean | Readonly<{ allowHTTP1: boolean }>,
ignoreTrailingSlash?: boolean,
Expand Down
1 change: 1 addition & 0 deletions types/instance.d.ts
Expand Up @@ -427,6 +427,7 @@ export interface FastifyInstance<
initialConfig: Readonly<{
connectionTimeout?: number,
keepAliveTimeout?: number,
forceCloseConnections?: boolean,
bodyLimit?: number,
caseSensitive?: boolean,
http2?: boolean,
Expand Down

0 comments on commit 4928abc

Please sign in to comment.