import Async from "typescene-async"; import Component from "./Component"; /** Represents a property binding, used by component factories to proxy properties on sub components to values taken from the base component instance */ export declare class Binding { /** Create a new binding based on the given property name/path (referring to the base component, on which .with or .initializeWith was called; e.g. "x", "!selected", or "activity.title", values can also be instances of ObservableValue or Promise), and optionally one or two transformation functions (for getter and/or setter) */ constructor(sourcePath?: string, getTransform?: (value: any) => (ResultT | Async.ObservableValue | PromiseLike)); /** Make an ObservableValue that is bound to the value on given component (used by factory initializer to apply binding) */ observeOn(component: Component, name: string): Async.ObservableValue; private _fget; } /** Represents a two-way binding (Binding that also applies a setter) */ export declare class TwoWayBinding extends Binding { constructor(sourcePath?: string, getTransform?: (value: any) => (ResultT | Async.ObservableValue | PromiseLike), setTransform?: (value: any) => any); observeOn(component: Component, name: string): Async.ObservableValue; private _fset; } /** Shortcut to create a new Binding with given argument; for use in a component initializer */ export declare function bind(sourcePath?: string): Binding; /** Shortcut to create a new Binding with given arguments; for use in a component initializer */ export declare function bind(sourcePath: string, getTransform: (value: any) => T): Binding; /** Shortcut to create a new TwoWayBinding with given argument; for use in a component initializer */ export declare function bind2(sourcePath?: string): TwoWayBinding; /** Shortcut to create a new TwoWayBinding with given arguments; for use in a component initializer */ export declare function bind2(sourcePath: string, getTransform: (value: any) => T, setTransform?: (value: any) => any): Binding; export default Binding;