The prebuilt files include `web/pdf_viewer.js` with some viewer APIs. Those are missing from type declarations.
const VERSION = getVersionJSON().version;
  const reason = process.env.PDFJS_UPDATE_REASON;
  safeSpawnSync("git", ["init"], { cwd: GH_PAGES_DIR });
  safeSpawnSync("git", ["remote", "add", "origin", REPO], {
    cwd: GH_PAGES_DIR,
  });
  safeSpawnSync("git", ["add", "-A"], { cwd: GH_PAGES_DIR });
  safeSpawnSync(
    "git",
    [
      "commit",
      "-am",
      "gh-pages site created via gulpfile.js script",
      "-m",
      "PDF.js version " + VERSION + (reason ? " - " + reason : ""),
    ],
    { cwd: GH_PAGES_DIR }
  );
  safeSpawnSync("git", ["branch", "-m", "gh-pages"], { cwd: GH_PAGES_DIR });
  console.log();
  console.log("Website built in " + GH_PAGES_DIR);
  done();
}
gulp.task(
  "web",
  gulp.series(
    "generic",
    "generic-legacy",
    "jsdoc",
    ghPagesPrepare,