The prebuilt files include `web/pdf_viewer.js` with some viewer APIs. Those are missing from type declarations.
"locale",
    function scriptingGenericLegacy() {
      const defines = builder.merge(DEFINES, {
        GENERIC: true,
        SKIP_BABEL: false,
      });
      return merge([
        buildDefaultPreferences(defines, "generic-legacy/"),
        createTemporaryScriptingBundle(defines),
      ]);
    },
    function createGenericLegacy() {
      console.log();
      console.log("### Creating generic (legacy) viewer");
      const defines = builder.merge(DEFINES, {
        GENERIC: true,
        SKIP_BABEL: false,
      });
      return buildGeneric(defines, GENERIC_LEGACY_DIR);
    }
  )
);
function buildComponents(defines, dir) {
  rimraf.sync(dir);
  const COMPONENTS_IMAGES = [
    "web/images/annotation-*.svg",
    "web/images/loading-icon.gif",
    "web/images/shadow.png",
  ];
  return merge([