Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
71 lines (56 loc) · 1.3 KB

File metadata and controls

71 lines (56 loc) · 1.3 KB
Copy raw file
Download raw file
Outline
Edit and raw actions

Recommended Node TSConfig settings

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

You can also use https://github.com/tsconfig/bases/ to find tsconfig.jsons to extend, simplifying your own JSON files to just the options for your project.

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

Node 16

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

Node 14

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

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"
  }
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.