The prebuilt files include `web/pdf_viewer.js` with some viewer APIs. Those are missing from type declarations.
let content = fs.readFileSync(filePath).toString();
  content = content.replace(find, replacement);
  fs.writeFileSync(filePath, content);
}
function getTempFile(prefix, suffix) {
  mkdirp.sync(BUILD_DIR + "tmp/");
  const bytes = require("crypto").randomBytes(6).toString("hex");
  const filePath = BUILD_DIR + "tmp/" + prefix + bytes + suffix;
  fs.writeFileSync(filePath, "");
  return filePath;
}
function createTestSource(testsName, bot) {
  const source = stream.Readable({ objectMode: true });
  source._read = function () {
    console.log();
    console.log("### Running " + testsName + " tests");
    const PDF_TEST = process.env.PDF_TEST || "test_manifest.json";
    const args = ["test.js"];
    switch (testsName) {
      case "browser":
        args.push("--reftest", "--manifestFile=" + PDF_TEST);
        break;
      case "browser (no reftest)":