canvasMaxAreaInBytes in DocumentInitParameters has type Boolean, preventing TypeScript users from passing the correct (numeric) value.
try {
      return globalThis.pdfjsWorker?.WorkerMessageHandler || null;
    } catch (ex) {
      return null;
    }
  }
  
  static get _setupFakeWorkerGlobal() {
    const loader = async () => {
      const mainWorkerMessageHandler = this._mainThreadWorkerMessageHandler;
      if (mainWorkerMessageHandler) {
        
        return mainWorkerMessageHandler;
      }
      if (typeof PDFJSDev === "undefined") {
        const worker = await import("pdfjs/pdf.worker.js");
        return worker.WorkerMessageHandler;
      }
      if (
        PDFJSDev.test("GENERIC") &&
        isNodeJS &&