Nice article. I've got a question and a suggestion. :)
The question: your "start" script is using ts-node, shouldn't it use node because it'd be an overkill otherwise? Maybe some performance issue?
The suggestion: in the following line, instead of not declaring the type of the parameter "next" which defaults to any, you can declare it of type NextFunction:
Nice article. I've got a question and a suggestion. :)
The question: your "start" script is using ts-node, shouldn't it use node because it'd be an overkill otherwise? Maybe some performance issue?
The suggestion: in the following line, instead of not declaring the type of the parameter "next" which defaults to
any
, you can declare it of typeNextFunction
:So, to import
NextFunction
, you can replaceimport { Request, Response } from 'express'
with: