https://github.com/mozilla/pdf.js/blob/0df1a5661958df0c4ed2f73b0f3266d825c5c280/src/display/api.js#L710-L719
The return type signature `@returns {Promise<{num: number, gen: number}>}` is mismatched with its definition. (should be `@returns {Promise<number>}`)
const worker = eval("require")(getWorkerSrc());
        return worker.WorkerMessageHandler;
      }
      await loadScript(getWorkerSrc());
      return window.pdfjsWorker.WorkerMessageHandler;
    };
    loader().then(fakeWorkerCapability.resolve, fakeWorkerCapability.reject);
    return fakeWorkerCapability.promise;
  }
  function createCDNWrapper(url) {
    
    
    
    const wrapper = "importScripts('" + url + "');";
    return URL.createObjectURL(new Blob([wrapper]));
  }
  /**
   * PDF.js web worker abstraction that controls the instantiation of PDF
   * documents. Message handlers are used to pass information from the main
   * thread to the worker thread and vice versa. If the creation of a web
   * worker is not possible, a "fake" worker will be used instead.
   */
  
  class PDFWorker {