Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 918 Bytes

Node-Target-Mapping.md

File metadata and controls

45 lines (35 loc) · 918 Bytes

Recommended Node TSConfig settings

You can let TypeScript transpile as little as possible by knowing what the baseline support for ECMAScript features are available in your node version.

To update this file, you can use node.green to map to the different options in microsoft/typescript@src/lib

Node 12

{
  "compilerOptions": {
    "lib": ["ES2019"],
    "module": "commonjs",
    "target": "ES2019"
  }
}

Node 10

{
  "compilerOptions": {
    "lib": ["es2018"],
    "module": "commonjs",
    "target": "es2018"
  }
}

Note: Follow issue #20411 for more information on changes to the es2018 target/lib.

Node 8

{
  "compilerOptions": {
    "lib": ["es2017"],
    "module": "commonjs",
    "target": "es2017"
  }
}