1.0.3 • Published 4 years ago
types-code v1.0.3
Installation
This is a Node.js module available through the npm registry.
Installation is done using the
npm install
command:
$ npm install http-status-schema
Features
- Declarations Types of name status error for functions
Examples
First you need import the package for your project:
import { selectStatus, StatusName } from 'http-status-schema';
class AppError {
status: number;
message: string;
constructor(status: StatusName , message: string){
this.status = selectStatus(status); // Convert the name of status to number
this.message = message;
}
}
License
1.0.3
4 years ago