code: function defer() /*: { promise: Promise, resolve: resolveHandler, reject: rejectHandler }*/ {
      let resolve, reject;
      const promise = new Promise((...args) => [ resolve, reject ] = args);
      return { promise, resolve, reject };
  }
docs: /*::
  type resolveHandler = (value: ?any) => void
  type rejectHandler = (error: Error) => void
  
  type DeferredPromise = Promise & {
  resolve: (value: ?any) => void,
  reject: (error: Error) => void,
  }