I am trying to resolve warnings I get when using the closure compiler to minify my TypeScript application, using my tsconfig.json
.
My current configuration:
{
"compilerOptions": {
"target": "es5",
"module": "system",
"noImplicitAny": false,
"removeComments": true,
"preserveConstEnums": true,
"outFile": "app.js",
"sourceMap": true
},
"files": [ ... ]
}
However I am getting the following warning, for the use of the keywords delete
, finally
and abstract
:
WARNING - Keywords and reserved words are not allowed as unquoted property names in older versions of JavaScript. If you are targeting newer versions of JavaScript, set the appropriate language_in option.
I did see the answer, How can I set the language_in option for the Closure compiler? which suggests using --compiler_flags="--language_in=ECMASCRIPT5"
to resolve, but that's what I thought "target": "es5"
was doing in my tsconfig.json
?
So despite having target
set, and I can see no other configuration options to the effect of language_in
having read the tsconfig.json
spec, I am unsure how to resolve.
Obviously, I could quote the property names, or ignore the warnings, but I wish to resolve the warnings, as I don't target older browsers.