blob: 7dc4afb4614887d15f2dccd1eda5ed9cdc4b3a08 [file] [log] [blame]
// constructing a view from a promise for a function
// view information provided explicitly before fulfillment
var Q = require("q");
var callableD = Q.defer();
setTimeout(function () {
callableD.resolve(function () {
return "called";
});
}, 1000);
callableD.promise
.viewInfo({
"type": "function"
})
.view()
.when(function (view) {
console.log("calling view");
Q(view())
.when(console.log)
})
.end()