Decorators for functions
Axel Rauschmayer
rauschma at icloud.com
Tue Oct 20 09:30:39 UTC 2015
https://github.com/wycats/javascript-decorators/blob/master/README.md
The decorator proposal does not include decorators for functions, because it isn’t clear how to make them work in the face of hoisting.
However, it would be great to have them. I see two possible solutions:
– A decorator on a function declaration prevents hoisting.
– Enable decorators for function expressions, arrow functions and generator function expressions.
Does either one of those make sense?
Axel
--
Dr. Axel Rauschmayer
axel at rauschma.de
rauschma.de
More information about the es-discuss
mailing list