express-cargo
Version:
express middleware for class-based request parsing
6 lines • 421 B
TypeScript
import { Request, Response, NextFunction } from 'express';
import { CargoValidationError } from './types';
export type CargoErrorHandler = (err: CargoValidationError, req: Request, res: Response, next: NextFunction) => void;
export declare function setCargoErrorHandler(handler: CargoErrorHandler): void;
export declare function getCargoErrorHandler(): CargoErrorHandler | null;
//# sourceMappingURL=errorHandler.d.ts.map