How to use experimental ES7 features.
Babel also has experimental support for ES7 proposals.
Subject to change
These proposals are subject to change so use with extreme caution. Babel may update without warning in order to track spec changes.
The TC39 categorises proposals into 4 stages:
Proposals that are stage 2 or above are enabled by default. Now this does not mean that they're guaranteed to be included in future ECMAScript specifications or maintained in Babel itself. Stage 2 is considered a good point for inclusion by default in Babel due to their relative maturity and need for critical proposal feedback.
NOTE: Stage 2 and above are enabled by default.
NOTE: Stage 2 and above are enabled by default.
$ babel --stage 0
babel.transform("code", { stage: 0 });
$ babel --optional es7.decorators
babel.transform("code", { optional: ["es7.decorators"] });