Decorators on functions
问题 I see that babel.js decorators (available in "stage 1") implement the spec at https://github.com/wycats/javascript-decorators. It appears that decorators are limited to (1) classes, (2) accessors, and (3) methods. In my case, I want to use decorators on plain old functions , as in @chainable function foo() { } where (just an example) function chainable(fn) { return function() { fn.apply(this, arguments); return this; }; } I don't see any logical reason why decorators should not be able to