UNPKG

ts-express-kit

Version:

A TypeScript starter kit for building Express applications with best practices.

9 lines (8 loc) 250 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const catchAsync = (fn) => { return (req, res, next) => { Promise.resolve(fn(req, res, next)).catch((err) => next(err)); }; }; exports.default = catchAsync;