Fastify: reply.statusCode is not defined in TS type definitions

Created on 23 Apr 2020  路  3Comments  路  Source: fastify/fastify

馃悰 Bug Report

Docs & implementation have a prop statusCode, which isn't available via FastifyReply<HttpResponse> definition.

Docs: https://www.fastify.io/docs/latest/Reply/#statuscode

Definitions: https://github.com/fastify/fastify/blob/64296c84b57eb8f6f63bf51579febcfd274a97a5/types/reply.d.ts#L8

bug typescript v3.x

All 3 comments

Hello! Would you like to open a pr? :)

Done!

Hi, going by the info displayed by GitHub in the commit, this fix should be included in v2.14.0: https://github.com/fastify/fastify/commit/2e9994d1c3cb0c61424d624674ec517360542c26

However, upon installing v2.14.0, I find that the type file, fastify.d.ts, still lacks the statusCode property in the FastifyReply type. Am I missing something? Is the type file built in a way that can result in an inconsistency like this before npm publish?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhaoyao91 picture zhaoyao91  路  3Comments

mcollina picture mcollina  路  4Comments

allevo picture allevo  路  3Comments

avilang picture avilang  路  3Comments

lfurzewaddock picture lfurzewaddock  路  3Comments