Can I target ES6 in tsconfig.json
?
I need Object.assign()
method in my code.
Can I target ES6 in tsconfig.json
?
I need Object.assign()
method in my code.
You can use ES6 features without changing tsconfig.json
, because core-js is included in the in polyfills.
// “lib”: [
// “dom”,
// “es2015”
// ],
Above in tsconfig is giving me hundreds of duplicate identifier across modules. When I uncomment it and use
` “types” : [“core-js”]``
it works. Would this be a good approach?
I don’t get any “duplicate identifier” errors with the default configuration. But if declaring core-js
in types
works for you I don’t see anything wrong with it, that’s what many Angular 2 projects do.