-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ECMAScript6
Tyler Breisacher edited this page Aug 22, 2014
·
11 revisions
There are major changes in store for EcmaScript 6 and will require major changes to Closure Compiler to support it.
This is a place to collect changes that will need to be made to the compiler.
Summary: https://github.com/lukehoban/es6features
Spec: http://people.mozilla.org/~jorendorff/es6-draft.html
The new parser is in place, and has replaced the old Rhino parser. It understands all ES6 features though there may still be a few bugs here and there.
We support transpilation of the following ES6 features down to ES3.
- let/const
- arrow functions
- default parameters and rest ("...") parameters in functions
- The spread ("...") operator in function calls and array literals
- Classes (ES6 classes will be @struct by default. You can add @unrestricted to override that behavior. See the 'JSDoc Tag Reference' section of the Google JS style guide for information about the @struct annotation.)
- Computed properties and short properties in object literals.
- Method declarations in object literals (though the 'super' keyword will not work, currently)
- "for of" loops
- generator functions
- template strings
- Better unicode escapes in string literals (e.g. "\u{1F436}" == "🐶")
Transpilation of these features will be supported soon:
- destructuring assignment
- modules
In progress.