-
Notifications
You must be signed in to change notification settings - Fork 65
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
addAspectToMatches
in ECMAScript 2015 classes
#35
Comments
Hey @mgechev, sounds like a cool project, and great catch. We haven't updated meld to be friendly for post-ES5 yet, but it's clearly time! One tricky situation is whether to deal with inherited properties or not. Currently, meld doesn't check One possibility is to limit it to own prototype properties for v2.0. Any thoughts on whether it's a good idea to continue supporting inherited properties, and on how to support them in post-ES5? |
I think it makes sense to support inherited properties. In Another thing, which I think makes sense in JavaScript are asynchronous joint points. In |
Are you traversing the prototype chain manually, calling
Cool. We had done that in wire.js's AOP plugin. It turned out to be incredibly useful for connecting asynchronous components. I'd certainly be open to meld supporting it directly. Is that something you'd like to contribute? |
In angular-aop I'm using simple I'd love to contribute! I have a few high-priority side projects which will probably keep me busy next 1-3 months. Right after that I'll follow up. |
Hello guys,
meld looks great! Congratulations for the job you did here.
I'm working on AOP library which takes advantage of ECMAScript 2016 decorators and as its foundation, currently, I'm using meld. However, I noticed that when applying aspect over a class defined with the ECMAScript 2015 class syntax the
addAspectToMatches
method doesn't work. This is caused by the fact that the methods added to the prototypes of the ES2015 classes are not enumerable butaddAspectToMatches
is usingfor..in
in order to get them.What I did is to use
Object.getOwnPropertyNames
instead, which works pretty well. Do you think it makes sense to do this change the algorithm used for iteration over the prototype's methods in meld?The text was updated successfully, but these errors were encountered: