Installation
npm install --save @types/express-async-wrap
Summary
This package contains type definitions for express-async-wrap (https://github.com/Greenfields/express-async-wrap#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-async-wrap.
index.d.ts
import { NextFunction } from "connect";
import { ErrorRequestHandler, Request, RequestHandler, Response } from "express-serve-static-core";
declare function asyncWrap(
handler: (req: Request, res: Response, next: NextFunction) => Promise<void>,
): RequestHandler;
declare function asyncWrap(
handler: (err: any, req: Request, res: Response, next: NextFunction) => Promise<void>,
): ErrorRequestHandler;
export default asyncWrap;
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:36 GMT
- Dependencies: @types/connect, @types/express-serve-static-core
Credits
These definitions were written by Remy Oudemans.