adaltas / node-http-status

Utility to interact with HTTP status code in Node.js
Other
442 stars 55 forks source link

Update status code key type definitions to be numbers #41

Closed dmmulroy closed 2 years ago

dmmulroy commented 2 years ago

Currently, the status code keys on the HttpStatus interface are typed incorrectly as strings.

For example:

interface HttpStatus {
  readonly '100': string;
}

When it should be

interface HttpStatus {
  readonly 100: string;
}

and you can see this to be true by looking at the real exported object: https://github.com/adaltas/node-http-status/blob/master/lib/index.js#L49

dmmulroy commented 2 years ago

@wdavidw could I get eyes on this? 🙏

wdavidw commented 2 years ago

OK, I'm gonna have to trust your words on it because I am no TS expert.

wdavidw commented 2 years ago

Version 1.5.3 was just published

dmmulroy commented 2 years ago

Thanks!