Reputation: 69
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
Upvotes: 0
Views: 1896
Reputation: 345
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.
Upvotes: 1