UNPKG

routing-controllers

Version:

Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage for Express / Koa using TypeScript.

10 lines (9 loc) 328 B
/** * Used to throw HTTP errors. * Just do throw new HttpError(code, message) in your controller action and * default error handler will catch it and give in your response given code and message . */ export declare class HttpError extends Error { httpCode: number; constructor(httpCode: number, message?: string); }