What is the recommended config for typescript if I want to ue the compiled sources with node 8?
most tutorials use the following tsconig.json:
I'm sure you've already found this but there is Microsoft's starter template here: https://github.com/Microsoft/TypeScript-Node-Starter
Whilst you are still on Node 8.x, keep your module set to commonjs, target can be es6.
compilerOptions.lib only defines what declarations the compiler uses for compile time checks, it does not affect the output of tsc. In other words, you can use whatever lib you want and not worry that your transpiled code will be any different (this is controlled entirely by compilerOptions.target).
Using es7 as a lib in your case will be fine and will give you type declarations for ES7 and under.
Array.includes is ES7 (ES2016) and therefore as you've discovered is not part of ES6. You could define your lib as; lib: ["es6", "ES2016.Array.Include"] to get around your issue.