Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add failing test cases for ES6 classes #61

Closed

Conversation

offirgolan
Copy link

No description provided.

@Ramblurr
Copy link

Are there any plans to support es6 classes soon?

@topaxi
Copy link

topaxi commented Mar 22, 2016

I think ES6 class support is nearly there, but they don't make sense yet, as the decorator proposal is still in flux. Babel 6 even dropped decorator support: http://babeljs.io/docs/plugins/transform-decorators/.

@Ramblurr
Copy link

Interesting. @topaxi do you see any future headaches by using this addon now?

@topaxi
Copy link

topaxi commented Mar 25, 2016

@Ramblurr I definitely see future hazards if you are using this now, first, we don't know when decorators will be standardized, second, we don't know what changes will be made until then. As far as I know, in the current spec, the order in which the decorators are executed was reversed, which might be a problem sooner than later (I'm not 100% sure on this one though @rwjblue might know more here).

@rwjblue
Copy link
Contributor

rwjblue commented Jun 28, 2017

@offirgolan - Mind rebasing here? I believe these tests will pass...

/* jshint ignore:start */
@computed('first', 'last')
/* jshint ignore:end */
get fullName() {
Copy link
Contributor

Choose a reason for hiding this comment

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

We explicitly throw on this:

ember-decorators does not support using getters and setters

I think mostly because we haven't thought it through just yet.

Thoughts @stefanpenner / @pzuraq?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can do this, we just have to figure out how to reach into existing descriptors in cases where both a getter and setter are used. I'll try to find some time later today to spike it out.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ya, I think it makes sense for @computed (for example), but not all of them. e.g. @observer with a getter or setter is pretty WAT...

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, yeah definitely, this should probably only be for @computed (can't think of another one where it would make sense tbh)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants