canvasMaxAreaInBytes in DocumentInitParameters has type Boolean, preventing TypeScript users from passing the correct (numeric) value.
this.#pendingCleanup = true;
    const success = this.#tryCleanup( false);
    if (resetStats && success) {
      this._stats &&= new StatTimer();
    }
    return success;
  }
  /**
   * Attempts to clean up if rendering is in a state where that's possible.
   * @param {boolean} [delayed] - Delay the cleanup, to e.g. improve zooming
   *   performance in documents with large images.
   *   The default value is `false`.
   * @returns {boolean} Indicates if clean-up was successfully run.
   */
  #tryCleanup(delayed = false) {