You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migration notes indicate that api changes to StatusCodes are not breaking (but recommended).
In http-status-codes v1, Status Codes were exported directly from the top-level module. i.e. HttpStatus.OK. In v2 all Status Codes live under an object called StatusCodes. i.e. HttpStatus.StatusCodes.OK. We made this change to cater to TypeScript users who prefer a dedicated value with an enum type. The previous values are still exported, but we won't continue to update them. Please migrate if you're using the old-style imports.
However, with either of the following imports HttpStatus.UNAUTHORIZED throws a reference error:
import HttpStatus from 'http-status-codes'
// or
import { HttpStatus } from 'http-status-codes'
Whereas
import { StatusCodes as HttpStatus } from 'http-status-codes';
works as expected.
The text was updated successfully, but these errors were encountered:
Migration notes indicate that api changes to StatusCodes are not breaking (but recommended).
However, with either of the following imports
HttpStatus.UNAUTHORIZED
throws a reference error:Whereas
works as expected.
The text was updated successfully, but these errors were encountered: