-
Notifications
You must be signed in to change notification settings - Fork 96
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
wrapComputed and computedDecoratorWithParams do not work with a getter/setter computed #404
Comments
Hmm, this seems more likely to be an issue with ember-macro-helpers doesn't it? |
@lolmaus first off, As for the issue, if you wanted to drop import computed from '@ember-decorators/object';
export function dateToLuxon(key: any) {
return computed(key, {
get() {
return Date2Luxon(this[key]);
},
set(luxonDate: DateTime) {
this.set(key, luxonDate.toJSDate());
},
});
} If you want to continue using macro-helpers, then |
But what is wrong with I would like to note the following:
I believe CP composition to be an important feature and humbly ask you to work together with @kellyselden to look into this. 🙇 🙏 PS I'm eager to help too but need some guidance. |
@lolmaus totally understand the value behind I can try to give you guidance where possible, but currently my focus is on landing decorators upstream in Ember, and making sure that doesn't completely break |
Hi!
This works:
But I would like to make this code reusable like this:
I'm trying to achieve it with this:
It doesn't work!
this.startDateLuxon
returnsundefined
. I've tried putting adebugger
into the getter, and it is never called.I also tried this and it doesn't work either:
CC @simonihmig.
The text was updated successfully, but these errors were encountered: