Babel plugin for transforming the initial stage 2 draft of ES decorators
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
lib
test
.editorconfig
.eslintrc
.gitignore
.npmrc
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
package.json

README.md

babel-plugin-transform-decorators-stage-2-initial

Warning: This transform currently tries to optimize for matching the spec as closely as possible. It is not fast or produces pretty output.

Warning: The proposal is still very much in flux and contains some ambiguity. The implementation in this repo is just one person's interpretation.

Warning: If you're using the object-rest-spread transform, make sure it runs before the decorator transform. Otherwise it will not work correctly.

Babel transform for the stage 2 decorators proposal.

npm install --save-dev babel-plugin-transform-decorators-stage-2-initial

Known Gaps

This transform will generally not work without also transforming the class declaration itself, e.g. with transform-es2015-classes. It might work when native Reflect.construct is used (e.g. node 6+) instead of a polyfill.

References