The prebuilt files include `web/pdf_viewer.js` with some viewer APIs. Those are missing from type declarations.
if (!checkFile(CMAP_INPUT + "/UniJIS-UCS2-H")) {
    console.log("./external/cmaps has no cmap files, download them from:");
    console.log("  https://github.com/adobe-type-tools/cmap-resources");
    throw new Error("cmap files were not found");
  }
  
  fs.readdirSync(VIEWER_CMAP_OUTPUT).forEach(function (file) {
    if (/\.bcmap$/i.test(file)) {
      fs.unlinkSync(VIEWER_CMAP_OUTPUT + "/" + file);
    }
  });
  const compressCmaps =
    require("./external/cmapscompress/compress.js").compressCmaps;
  compressCmaps(CMAP_INPUT, VIEWER_CMAP_OUTPUT, true);
  done();
});
function preprocessCSS(source, mode, defines, cleanup) {
  const outName = getTempFile("~preprocess", ".css");
  builder.preprocessCSS(mode, source, outName);
  let out = fs.readFileSync(outName).toString();
  fs.unlinkSync(outName);
  if (cleanup) {
    
    const reg = /\n\/\* Copyright(.|\n)*?Mozilla Foundation(.|\n)*?\*\//g;
    out = out.replace(reg, "");
  }
  const i = source.lastIndexOf("/");
  return createStringSource(source.substr(i + 1), out);
}
function preprocessHTML(source, defines) {