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 false;
    }
    if (
      !(
        Number.isInteger(pageNumber) &&
        pageNumber > 0 &&
        pageNumber <= this.pagesCount
      )
    ) {
      console.error(`isPageVisible: "${pageNumber}" is not a valid page.`);
      return false;
    }
    return this._getVisiblePages().ids.has(pageNumber);
  }
  /**
   * @param {number} pageNumber
   */
  isPageCached(pageNumber) {