Decorators for functions

Axel Rauschmayer rauschma at
Tue Oct 20 09:30:39 UTC 2015

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?


Dr. Axel Rauschmayer
axel at

More information about the es-discuss mailing list