dist/core/decorators.js
function bindData(target, key, selector) {
    return state_1.State.select(selector).subscribe(function (args) {
        if (typeof target.setState === 'function') {
            var state = {};
            state[key] = args;
            target.setState(state);
        }
        if (typeof target[key] === 'function')
            return target[key].call(target, args);
        target[key] = args;
    });
}
function bindData(target, key, selector) {
    return state_1.State.select(selector).subscribe(function (args) {
        if (typeof target.setState === 'function') {
            var state = {};
            state[key] = args;
            target.setState(state);
        }
        if (typeof target[key] === 'function')
            return target[key].call(target, args);
        target[key] = args;
    });
}
function bindData ( target , key , selector ) { return state_1 . State . select ( selector ) . subscribe ( function ( args ) { if ( typeof target . setState === 'function' ) { var state = { } ; state [ key ] = args ; target . setState ( state ) ; } if ( typeof target [ key ] === 'function' ) return target [ key ] . call ( target , args ) ; target [ key ] = args ; } ) ; }
Bind data for give key and target using a selector function

@param {any} target
@param {any} key
@param {any} selectorFunc
Bind data for give key and target using a selector function