canvasMaxAreaInBytes in DocumentInitParameters has type Boolean, preventing TypeScript users from passing the correct (numeric) value.
this._passwordCapability = null;
    this._networkStream = networkStream;
    this._fullReader = null;
    this._lastProgress = null;
    this.downloadInfoCapability = new PromiseCapability();
    this.setupMessageHandler();
    if (typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING")) {
      
      Object.defineProperty(this, "getXFADatasets", {
        value: () => {
          return this.messageHandler.sendWithPromise("GetXFADatasets", null);
        },
      });
      Object.defineProperty(this, "getXRefPrevValue", {
        value: () => {
          return this.messageHandler.sendWithPromise("GetXRefPrevValue", null);
        },
      });
    }
  }
  #cacheSimpleMethod(name, data = null) {
    const cachedPromise = this.#methodPromises.get(name);
    if (cachedPromise) {
      return cachedPromise;
    }
    const promise = this.messageHandler.sendWithPromise(name, data);
    this.#methodPromises.set(name, promise);
    return promise;
  }
  get annotationStorage() {