tranxpress
Version:
A smart async wrapper for Express with MongoDB transaction support.
7 lines (6 loc) • 332 B
TypeScript
import { Request, Response, NextFunction } from "express";
export interface AsyncHandlerOptions {
useTransaction?: boolean;
customErrorHandler?: (error: any, req: Request, res: Response, next: NextFunction) => Promise<void> | void;
}
export type AsyncFn = (req: Request, res: Response, next: NextFunction) => Promise<void>;