function Deferred () {
        const controller = {};
        return Object.assign(new Promise((resolve, reject) => {
          controller.resolve = resolve;
          controller.reject = reject;
        }), controller);
      }
@returns {Partial<Promise & { resolve(v): void, reject(e): void }>}