const HttpStatus = {
200: "OK",
201: "Created",
400: "Bad Request",
404: "Not Found",
500: "Server Error"
} as const;
// This would be: {readonly 200: "OK"; readonly 201:"Created"; ...}
type HttpStatusType = typeof HttpStatus;
// This would be: 200 | 201 | 400 | 404 | 500
type HttpCode = keyof typeof HttpStatus;
// This would be: "OK" | "Created" | "Bad Request" | "Not Found" | "Server Error"
type HttpMessage = typeof HttpStatus[keyof typeof HttpStatus];
To embed this project on your website, copy the following code and paste it into your website's HTML: