cocos2d-x/cocos/scripting/js-bindings/script/debugger/core/promise.js
/**
 * Returns a promise resolved to a given `value`. Optionally a second
 * `prototype` argument may be provided to be used as a prototype for the
 * returned promise.
 */
Returns a promise resolved to a given `value`. Optionally a second
`prototype` argument may be provided to be used as a prototype for the
returned promise.
Returns a promise resolved to a given ` value ` . Optionally a second ` prototype ` argument may be provided to be used as a prototype for the returned promise .
function resolve(value, prototype) {
  var deferred = defer(prototype);
  deferred.resolve(value);
  return deferred.promise;
}
function resolve ( value , prototype ) { var deferred = defer ( prototype ) ; deferred . resolve ( value ) ; return deferred . promise ; }
Returns a promise resolved to a given `value`.
Returns a promise resolved to a given ` value ` .