https://github.com/mozilla/pdf.js/blob/0df1a5661958df0c4ed2f73b0f3266d825c5c280/src/display/api.js#L710-L719
The return type signature `@returns {Promise<{num: number, gen: number}>}` is mismatched with its definition. (should be `@returns {Promise<number>}`)
this._objs = Object.create(null);
  }
}
/**
 * Allows controlling of the rendering tasks.
 */
class RenderTask {
  constructor(internalRenderTask) {
    this._internalRenderTask = internalRenderTask;
    /**
     * Callback for incremental rendering -- a function that will be called
     * each time the rendering is paused.  To continue rendering call the
     * function that is the first argument to the callback.
     * @type {function}
     */
    this.onContinue = null;
  }
  /**
   * Promise for rendering task completion.
   * @type {Promise<void>}
   */
  get promise() {
    return this._internalRenderTask.capability.promise;
  }
  /**
   * Cancels the rendering task. If the task is currently rendering it will
   * not be cancelled until graphics pauses with a timeout. The promise that
   * this object extends will be rejected when cancelled.
   */
  cancel() {