Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between es6 and es2015 in Typescript compiler option --libs

Tags:

typescript

What's the difference between es6 and es2015 in Typescript compiler option (https://www.typescriptlang.org/docs/handbook/compiler-options.html) --libs ?

enter image description here

like image 628
LiangWang Avatar asked Nov 09 '17 02:11

LiangWang


1 Answers

None, they're just aliases to the same thing, and a remnant of a bad naming decision in the earlier days of JavaScript standardization.

ES2015 is the same as ES6, and ES2016 is the same as ES7. In the case of --lib, ES2015 also allows some granularity with separate definition packages, but it's really just a naming convention.

Eventually it'll all be kept as ES20xx and we can pretend ESx never happened.

like image 173
zeh Avatar answered Nov 15 '22 05:11

zeh