PDF.js version: 3.5.141

These two properties should be marked as not mandatory as they are initialized if not present
return this.#annotationEditorUIManager
      ? this.#annotationEditorMode
      : AnnotationEditorType.DISABLE;
  }
  /**
   * @param {number} mode - AnnotationEditor mode (None, FreeText, Ink, ...)
   */
  set annotationEditorMode(mode) {
    if (!this.#annotationEditorUIManager) {
      throw new Error(`The AnnotationEditor is not enabled.`);
    }
    if (this.#annotationEditorMode === mode) {
      return; 
    }
    if (!isValidAnnotationEditorMode(mode)) {
      throw new Error(`Invalid AnnotationEditor mode: ${mode}`);
    }
    if (!this.pdfDocument) {
      return;
    }
    this.#annotationEditorMode = mode;
    this.eventBus.dispatch("annotationeditormodechanged", {
      source: this,
      mode,
    });
    this.#annotationEditorUIManager.updateMode(mode);
  }
  
  set annotationEditorParams({ type, value }) {