A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping below:

Node Target Mapping · microsoft/TypeScript Wiki · GitHub

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

{
  "compilerOptions": {
    "lib": ["ES2024"],
    "module": "nodenext",
    "target": "ES2024"
  }
}

Note: module is set to nodenext to allow require("esm"). After TypeScript 5.9 is released, it is recommended to set it to node20 instead.

{
  "compilerOptions": {
    "lib": ["ES2023"],
    "module": "nodenext",
    "target": "ES2023"
  }
}

Note: module is set to nodenext to allow require("esm"). After TypeScript 5.9 is released, it is recommended to set it to node20 instead.

{
  "compilerOptions": {
    "lib": ["ES2023"],
    "module": "nodenext",
    "target": "ES2023"
  }
}

Note: module is set to nodenext to allow require("esm"). After TypeScript 5.9 is released, it is recommended to set it to node20 instead.

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

Note: Due to a V8 bug, one rarely-used ES2020 feature was incorrectly implemented in Node <16.3.0 - "spread parameters after optional chaining"; see issue 46325. If you use this feature and need to support versions of Node before 16.3.0, you may need to drop target to ES2019.

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

Note: Due to a V8 bug, one rarely-used ES2020 feature was incorrectly implemented in all releases of Node 14 - "spread parameters after optional chaining"; see issue 46325. If you use this feature, you may need to drop target to ES2019.

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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4