It's common to encounter situations like this where TypeScript struggles to infer types due to lack of context.
Is there a way to explicitly declare the type of function for the compiler?
router.get('/get', imget);
router.get('/send', imsend);
function imget(req, res, next) { }
function imsend(req, res, next) { }
export = router;
I've experimented with various type assertions but they all lead to syntax errors.
For example:
function imget(req, res, next) { } as express.RequestHandler