Return value with promise from generated func

That is imporant fix when you use smth like:
var value = object.$get(...)