The prebuilt files include `web/pdf_viewer.js` with some viewer APIs. Those are missing from type declarations.
return gulp
    .src(dir + "**")
    .pipe(zip(targetName))
    .pipe(gulp.dest(BUILD_DIR))
    .on("end", function () {
      console.log("Built distribution file: " + targetName);
    });
}
gulp.task(
  "publish",
  gulp.series("generic", "generic-legacy", function createPublish(done) {
    const version = JSON.parse(
      fs.readFileSync(BUILD_DIR + "version.json").toString()
    ).version;
    config.stableVersion = config.betaVersion;
    config.betaVersion = version;
    return merge([
      createStringSource(CONFIG_FILE, JSON.stringify(config, null, 2)).pipe(
        gulp.dest(".")
      ),
      compressPublish("pdfjs-" + version + "-dist.zip", GENERIC_DIR),
      compressPublish(
        "pdfjs-" + version + "-legacy-dist.zip",
        GENERIC_LEGACY_DIR
      ),
    ]);
  })
);
function setTestEnv(done) {