ko.mapping can transform get, set property’s (ES5) in single ko.computed ?
var people = {
get Name (){
return this._name;
},
set Name(value){
this._name = value;
}
};
var vm = ko.mapping(people, {/* mapping getset to computed */});
vm.Name instanceOf ko.computed === true.
ko.mapping support this or how do this ?
I’m sure you mean to use an observable, not a computed, as this would not depend on other observables.
I created a gist, including tests, of creating models with observable properties, and some utilty functions to create them. The core code is here: