-
-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
It would be great to use aurelia-typed-observable-plugin in UX components.
At the moment, whenever we need a boolean or a number property, a lot of plumbing code is needed to convert strings to typed values.
E.g.
debounceNumber: number | null | undefined = this.defaultConfiguration.debounce;
@bindable
debounce: number | string | undefined = this.defaultConfiguration.debounce;
debounceChanged() {
this.debounceNumber = normalizeNumberAttribute(this.debounce);
}As you can see, far from convenient. Plus, I need to remember to use a shadow property instead of a bindable directly.
With the plugin this becomes just
@bindable // this is plugin's bindable
debounce: number = this.defaultConfiguration.debounce;The advantage is obvious
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels