PDF.js version: 3.5.141

These two properties should be marked as not mandatory as they are initialized if not present
return !!this._scriptingManager;
  }
  /**
   * @type {number}
   */
  get currentPageNumber() {
    return this._currentPageNumber;
  }
  /**
   * @param {number} val - The page number.
   */
  set currentPageNumber(val) {
    if (!Number.isInteger(val)) {
      throw new Error("Invalid page number.");
    }
    if (!this.pdfDocument) {
      return;
    }
    
    if (!this._setCurrentPageNumber(val,  true)) {
      console.error(`currentPageNumber: "${val}" is not a valid page.`);
    }
  }
  /**
   * @returns {boolean} Whether the pageNumber is valid (within bounds).
   * @private
   */
  _setCurrentPageNumber(val, resetCurrentPageView = false) {