'Typescript 4.6.4 tsconfig.json target
I have just upgraded to Typescript 4.6.4 and in the tsconfig.json file I wanted to update the target to es2022 but I am getting this error. Is there a setting in vs2019 that I need to change for this to work?
Severity Code Description File Project Line Suppression State Error Build:Argument for '--target' option must be 'ES3', 'ES5', or 'ES2015'. C:\WebProjects\ITF\Web\tsc OrderTemplateTool.Web
PS C:\WebProjects\ITF\Web> tsc -version
Version 4.6.4
Angular 12 installed
Solution 1:[1]
This is exclusive to Visual Studio.
Right click the project in Solution Explorer and then click Properties -> TypeScript Build under General. There you can set ES Version and module system.
If this does not help try adding: "compileOnSave": true, to your tsconfig.json.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | m-s7 |


