UNPKG
error-response-handler
Version:
latest (1.0.5)
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
Comprehensive error handling and response formatting for Node.js applications
error-response-handler
/
dist
/
asyncHandler.d.ts
3 lines
(2 loc)
•
238 B
TypeScript
View Raw
1
2
3
import
{
Request
,
Response
,
NextFunction
}
from
'express'
;
export
declare
const
asyncHandler
: <T>
(
fn
: (req: Request, res: Response, next: NextFunction) =>
Promise
<T>
) =>
(
req
:
Request
,
res
:
Response
,
next
:
NextFunction
) =>
Promise
<
void
>;