Function with a return type of a given parameter’s function return type
function execute<T>(fn: () => T): ReturnType<typeof fn> {
// ...
return fn()
}
Yay for IntelliSense
- If your wrapper function (outer) always needs to be a promise, but the handler (inner) can be either - https://stackoverflow.com/a/49889856
Bunyan Global Logger
Allow using logger.info(...)
anywhere
Sucrase w/ Nodemon
Use with sucrase-node on TypeScript files through nodemon