UNPKG

very-express

Version:

based on json schema and openapi, generate Express RestApi server with mongoDb

30 lines (26 loc) 642 B
/** * Generated by veryExpress@0.6.3-alpha * https://github.com/Justin26l/VeryExpress */ import { ResponseCode } from "./../../_utils/response.gen"; export class VexResOk<T = unknown> extends Error { public status: number; public body?: { code?: ResponseCode; message?: string | null; result?: T; }; constructor( status: number = 200, body?: { code?: ResponseCode; message?: string | null; result?: T; } ) { super("VexResOk"); this.name = "VexResOk"; this.status = status; this.body = body; } }