PDF.js version: 3.5.141

These two properties should be marked as not mandatory as they are initialized if not present
if (!this.pdfDocument) {
      return;
    }
    this.#setScale(val, { noScroll: false });
  }
  /**
   * @type {number}
   */
  get pagesRotation() {
    return this._pagesRotation;
  }
  /**
   * @param {number} rotation - The rotation of the pages (0, 90, 180, 270).
   */
  set pagesRotation(rotation) {
    if (!isValidRotation(rotation)) {
      throw new Error("Invalid pages rotation angle.");
    }
    if (!this.pdfDocument) {
      return;
    }
    
    rotation %= 360;
    if (rotation < 0) {
      rotation += 360;
    }
    if (this._pagesRotation === rotation) {
      return; 
    }