PDF.js version: 3.5.141

These two properties should be marked as not mandatory as they are initialized if not present
if (!(promise instanceof Promise)) {
      throw new Error(`Invalid optionalContentConfigPromise: ${promise}`);
    }
    if (!this.pdfDocument) {
      return;
    }
    if (!this._optionalContentConfigPromise) {
      
      
      return;
    }
    this._optionalContentConfigPromise = promise;
    this.refresh(false, { optionalContentConfigPromise: promise });
    this.eventBus.dispatch("optionalcontentconfigchanged", {
      source: this,
      promise,
    });
  }
  /**
   * @type {number} One of the values in {ScrollMode}.
   */
  get scrollMode() {