-
-
Notifications
You must be signed in to change notification settings - Fork 102
feat(interfaces): define and specify a well typed configuration object #601
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
base: master
Are you sure you want to change the base?
Changes from all commits
2207bdf
a75c767
056020a
d9220c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| import {bindingMode} from 'aurelia-binding'; | ||
| import {View} from './view'; | ||
| import {ViewStrategy} from './view-strategy'; | ||
|
|
||
|
|
@@ -67,3 +68,29 @@ interface DynamicComponentGetViewStrategy { | |
| */ | ||
| getViewStrategy(): string|ViewStrategy; | ||
| } | ||
|
|
||
| /** | ||
| * An optional interface describing the configuration object that can be specified to customize bindable properties. | ||
| */ | ||
| interface BindablePropertyConfig { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it also takes a property name There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! |
||
| /** | ||
| * The default binding mode of the property. | ||
| */ | ||
| defaultBindingMode?: bindingMode; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this will need to be number, since bindingMode is actually an object, not an enum or union type. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not that simple. |
||
| /** | ||
| * The name of a view model method to invoke when the property is updated. | ||
| */ | ||
| changeHandler?: string; | ||
| /** | ||
| * Designates the property as the default bindable property among all the other bindable properties when used in a custom attribute with multiple bindable properties. | ||
| */ | ||
| primaryProperty?: boolean; | ||
| /** | ||
| * The name of the property. | ||
| */ | ||
| name?: string; | ||
| /** | ||
| * A default value for the property. | ||
| */ | ||
| defaultValue?: any | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bindingModeis unfortunately a const object at this time. So, I don't think it can be used as a type. Can we revert this back to number?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that with newest API on
BindableProperty, it now understands lookup property ofbindingModesuch astoView,fromView,twoView,oneTime@EisenbergEffect do we need to adjust this based on that ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bigopon So, it will accept either a string or a number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EisenbergEffect Yes it's added in this commit e7da973#diff-8fecf3f03eea2e940742fe22c0791bfbR51
It was to support Aurelia plugins / classes