Are we allowed to target ES6?


#1

Can I target ES6 in tsconfig.json ?

I need Object.assign() method in my code.


#2

You can use ES6 features without changing tsconfig.json, because core-js is included in the in polyfills.


#3

// “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?


#4

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.