From e5b11f7f7a4e8067da9b3745246c23abdb77996e Mon Sep 17 00:00:00 2001 From: Erjan Gavalji Date: Thu, 5 Mar 2015 10:29:08 +0200 Subject: [PATCH] Exclude stuff from previous-version documentation --- ui/core/bindable.d.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/ui/core/bindable.d.ts b/ui/core/bindable.d.ts index 8a70303a1..c6a7347b0 100644 --- a/ui/core/bindable.d.ts +++ b/ui/core/bindable.d.ts @@ -17,8 +17,34 @@ * True to establish a two-way binding, false otherwise. A two-way binding will synchronize both the source and the target property values regardless of which one initiated the change. */ twoWay?: boolean; + //@private + /** + * An expression used for calculations (convertions) based on the value of the property. + */ + expression?: string; + //@endprivate } + + //@private + /** + * An interface which defines methods need to create binding value converter. + */ + export interface ValueConverter { + /** + * A method that will be executed when a value (of the binding property) should be converted to the observable model. + * For example: user types in a text field, but our business logic requires to store data in a different manner (e.g. in lower case). + * @param params - An array of parameters where first element is the value of the property and next elements are parameters send to converter. + */ + toModel: (...params: any[]) => any; + /** + * A method that will be executed when a value should be converted to the UI view. For example we have a date object which should be displayed to the end user in a specific date format. + * @param params - An array of parameters where first element is the value of the property and next elements are parameters send to converter. + */ + toView: (...params: any[]) => any; + } + //@endprivate + /** * Represents an extended DependencyObservable object that supports data-binding. */ @@ -45,6 +71,7 @@ unbind(property: string); //@private + static _getBindingOptions(name: string, bindingExpression: string): BindingOptions; _updateTwoWayBinding(propertyName: string, value: any); _onBindingContextChanged(oldValue: any, newValue: any); //@endprivate