Right now I have this in a custom .d.ts file:
import { Request, Response, NextFunction } from 'express';
export type MiddleWareFn = (req: Request, res: Response, next: NextFunction) => void;
and I reference that file like so:
router.use('/foo', <MiddleWareFn> function(req,res,next){});
however I am wondering if Express has typings for middleware functions already?