PDF.js version: 3.5.141

These two properties should be marked as not mandatory as they are initialized if not present
const scrollMode = this._scrollMode,
      viewer = this.viewer;
    viewer.classList.toggle(
      "scrollHorizontal",
      scrollMode === ScrollMode.HORIZONTAL
    );
    viewer.classList.toggle("scrollWrapped", scrollMode === ScrollMode.WRAPPED);
    if (!this.pdfDocument || !pageNumber) {
      return;
    }
    if (scrollMode === ScrollMode.PAGE) {
      this.#ensurePageViewVisible();
    } else if (this._previousScrollMode === ScrollMode.PAGE) {
      
      
      this._updateSpreadMode();
    }
    
    
    
    if (this._currentScaleValue && isNaN(this._currentScaleValue)) {
      this.#setScale(this._currentScaleValue, { noScroll: true });
    }
    this._setCurrentPageNumber(pageNumber,  true);
    this.update();
  }
  /**
   * @type {number} One of the values in {SpreadMode}.
   */
  get spreadMode() {