import { Request , Response , NextFunction } from 'express' ; param { function } fn export function asyncWrapper ( fn ) { return async ( req , res , next ) : Promise < void > => { try { await fn ( req , res ) ; return ; } catch ( err ) { next ( err ) ; } } ; }