-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Description
What should be the value of "this" inside the decorator? For example if you do something like:
@Decorators.decorate
class A {}When being inside decorate, the value of this should be Decorators, right?
I'm asking that because I haven't been able to find this inside the proposed specification, and I think it's nice to have it defined. Also, if that's the case, the current plugin for babel (the babel-plugin-transform-decorators-legacy) should be changed to support it. Right now the compilation is done as:
(_dec = Decorators.decorate, _dec(_class = function () { ... }))Which would be incorrect (this is undefined in strict mode, or the global object in loose mode).
Metadata
Metadata
Assignees
Labels
No labels