The prebuilt files include `web/pdf_viewer.js` with some viewer APIs. Those are missing from type declarations.
saveComments: false,
    defines: bundleDefines,
    map: {
      "pdfjs-lib": "../pdf",
    },
  };
  const licenseHeaderLibre = fs
    .readFileSync("./src/license_header_libre.js")
    .toString();
  const preprocessor2 = require("./external/builder/preprocessor2.js");
  return inputStream
    .pipe(transform("utf8", preprocess))
    .pipe(gulp.dest(outputDir));
}
function buildLib(defines, dir) {
  const versionInfo = getVersionJSON();
  const bundleDefines = builder.merge(defines, {
    BUNDLE_VERSION: versionInfo.version,
    BUNDLE_BUILD: versionInfo.commit,
    TESTING: defines.TESTING || process.env.TESTING === "true",
    DEFAULT_PREFERENCES: getDefaultPreferences(
      defines.SKIP_BABEL ? "lib/" : "lib-legacy/"
    ),
  });
  const inputStream = merge([
    gulp.src(
      [
        "src/{core,display,shared}/**/*.js",
        "!src/shared/{cffStandardStrings,fonts_utils}.js",
        "src/{pdf,pdf.worker}.js",