Package Exports
- http-status-code-const-enum
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (http-status-code-const-enum) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Say no to typos.
npm install -d http-status-code-const-enum
Basic usage:
import {Request, Response} from 'express';
import {HttpStatusCode} from 'http-status-code-const-enum';
function myHandler(req: Request, res: Response) {
res.status(HttpStatusCode.NO_CONTENT)
.end();
}Please note that this is a const enum, meaning it cannot be used in a pure JavaScript environment and is therefore only suited for TypeScript.