tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"target": **TARGET**,
...
}
...
}
Install Node typings (change version to node environment):
npm install --save-dev @types/node@^8.0.0
According to the compatibility chart:
- Node 7: es2016
- Node 8: es2016
- Node 9: es2017
- Node 10: es2018