packages/@pollyjs/core/src/utils/deferred-promise.js
/**
 * Create a deferred promise with `resolve` and `reject` methods.
 */
Create a deferred promise with `resolve` and `reject` methods.
Create a deferred promise with ` resolve ` and ` reject ` methods .
function defer() {
  let _resolve;
  let _reject;
  const promise = new Promise((resolve, reject) => {
    _resolve = resolve;
    _reject = reject;
  });
  promise.resolve = _resolve;
  promise.reject = _reject;
  return promise;
}
function defer ( ) { let _resolve ; let _reject ; const promise = new Promise ( ( resolve , reject ) => { _resolve = resolve ; _reject = reject ; } ) ; promise . resolve = _resolve ; promise . reject = _reject ; return promise ; }
Create a deferred promise with `resolve` and `reject` methods.
Create a deferred promise with ` resolve ` and ` reject ` methods .