Typescript: Does TypeScript 3.7.4 support "target: ES2020"?

Created on 21 Jul 2020  路  2Comments  路  Source: microsoft/TypeScript

The announcement of TypeScript 3.8 says: TypeScript 3.8 supports ES2020 as an option for module and target.

Though I don't understand whether the previous versions support the same features. There is no such information on the official page dedicated to Compiler Options, the line for target lists all the targets without the breakdown I was searing for.

The only source I can rely on right now is TypeScript Playground:
Screen Shot 2020-07-17 at 5 42 06 PM
Screen Shot 2020-07-17 at 5 42 37 PM

However, I don't understand whether I can use "target: ES2020" with TS v3.7.4 or not.

Question

Most helpful comment

@RyanCavanaugh Thanks :)

All 2 comments

No. You can run tsc --help and read its output:

Version 3.7.4
Syntax:   tsc [options] [file...]

Examples: tsc hello.ts
          tsc --outFile file.js file.ts
          tsc @args.txt
          tsc --build tsconfig.json

Options:
 -h, --help                                         Print this message.
 -w, --watch                                        Watch input files.
 --pretty                                           Stylize errors and messages using color and context (experimental).
 --all                                              Show all compiler options.
 -v, --version                                      Print the compiler's version.
 --init                                             Initializes a TypeScript project and creates a tsconfig.json file.
 -p FILE OR DIRECTORY, --project FILE OR DIRECTORY  Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.
 -b, --build                                        Build one or more projects and their dependencies, if out of date
 -t VERSION, --target VERSION                       Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'.

@RyanCavanaugh Thanks :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Roam-Cooper picture Roam-Cooper  路  3Comments

kyasbal-1994 picture kyasbal-1994  路  3Comments

manekinekko picture manekinekko  路  3Comments

remojansen picture remojansen  路  3Comments

jbondc picture jbondc  路  3Comments