canvasMaxAreaInBytes in DocumentInitParameters has type Boolean, preventing TypeScript users from passing the correct (numeric) value.
pageColors = null,
    printAnnotationStorage = null,
  }) {
    if (
      (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) &&
      arguments[0]?.canvasFactory
    ) {
      throw new Error(
        "render no longer accepts the `canvasFactory`-option, " +
          "please pass it to the `getDocument`-function instead."
      );
    }
    this._stats?.time("Overall");
    const intentArgs = this._transport.getRenderingIntent(
      intent,
      annotationMode,
      printAnnotationStorage
    );
    
    
    this.#pendingCleanup = false;
    
    this.#abortDelayedCleanup();
    if (!optionalContentConfigPromise) {
      optionalContentConfigPromise = this._transport.getOptionalContentConfig();
    }
    let intentState = this._intentStates.get(intentArgs.cacheKey);
    if (!intentState) {
      intentState = Object.create(null);
      this._intentStates.set(intentArgs.cacheKey, intentState);