Skip to content
This repository was archived by the owner on May 19, 2018. It is now read-only.

white lists getter and setter acceseors for having stage-2 decorators (#756)#766

Merged
danez merged 1 commit intobabel:masterfrom
mbehzad:accessor-decorator-(#756)
Oct 31, 2017
Merged

white lists getter and setter acceseors for having stage-2 decorators (#756)#766
danez merged 1 commit intobabel:masterfrom
mbehzad:accessor-decorator-(#756)

Conversation

@mbehzad
Copy link
Copy Markdown
Contributor

@mbehzad mbehzad commented Oct 19, 2017

  • adds get and set kind in addition to method to the list of allowed class members for having a decorator,
  • adds tests for this two cases (decorator + set and decorator + get)
Q A
Bug fix? yes
Breaking change? no
New feature? no
Deprecations? no
Spec compliancy? yes/no
Tests added/pass? yes
Fixed tickets #756
License MIT

For stage 2 decorators, the parseClassBody checks if the decorator is attached to a class method. aka its kind is method. And throws an error if not.
commit af08e92 adds set and get to the class members which are allowed to have a decorator. (extends the check to kind === set || get in addition to method

- adds `get` and `set` kind in addition to `method` to the list of allowed class members for having a decorator,
- adds tests for this two cases (decorator + set and decorator + get)
@mbehzad
Copy link
Copy Markdown
Contributor Author

mbehzad commented Oct 19, 2017

I don't know why the travis build failed. the tests work locally fine. Except the linting which throws error in types.js which was last changed with the usage of prettier in commit 5180ecd (#600) couple of months ago. 🤔

Copy link
Copy Markdown
Member

@danez danez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, lgtm

@danez
Copy link
Copy Markdown
Member

danez commented Oct 31, 2017

Thank you very much for your first pull request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants