canvasMaxAreaInBytes in DocumentInitParameters has type Boolean, preventing TypeScript users from passing the correct (numeric) value.
this.annotationCanvasMap,
      this.pageColors
    );
    this.gfx.beginDrawing({
      transform,
      viewport,
      transparency,
      background,
    });
    this.operatorListIdx = 0;
    this.graphicsReady = true;
    this.graphicsReadyCallback?.();
  }
  cancel(error = null, extraDelay = 0) {
    this.running = false;
    this.cancelled = true;
    this.gfx?.endDrawing();
    if (this._canvas) {
      InternalRenderTask.#canvasInUse.delete(this._canvas);
    }
    this.callback(
      error ||
        new RenderingCancelledException(
          `Rendering cancelled, page ${this._pageIndex + 1}`,
          "canvas",
          extraDelay
        )
    );
  }
  operatorListChanged() {