node-http-status icon indicating copy to clipboard operation
node-http-status copied to clipboard

TypeScript Support Missing in http-status v1.8.0

Open checkiamsiam opened this issue 1 year ago • 9 comments

Describe the bug

In version 1.8.0 of the http-status package, TypeScript support has been removed. The previous versions included TypeScript definitions, making it easy to use the package in TypeScript projects. Additionally, the separate TypeScript definition package (@types/http-status) has been deprecated, leaving no official TypeScript support for the package.

To Reproduce

The issue can be reproduced by attempting to use the http-status package in a TypeScript project with the latest version (1.8.0). Below is a minimal example:

Copy code
import { StatusCodes } from 'http-status';


const statusCode: number = StatusCodes.OK;
console.log(`Status code is ${statusCode}`);

When trying to compile this TypeScript code, it results in errors due to missing type definitions.

Additional context

The lack of TypeScript support in the latest version breaks compatibility for existing TypeScript projects using http-status. Previously, it was possible to use the built-in TypeScript definitions or rely on the separate @types/http-status package, but with the latter now deprecated, there is no official TypeScript support.

checkiamsiam avatar Oct 19 '24 08:10 checkiamsiam