canvasMaxAreaInBytes in DocumentInitParameters has type Boolean, preventing TypeScript users from passing the correct (numeric) value.
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
    return null; 
  }
  if (val instanceof URL) {
    return val.href;
  }
  try {
    
    return new URL(val, window.location).href;
  } catch (ex) {
    if (
      typeof PDFJSDev !== "undefined" &&
      PDFJSDev.test("GENERIC") &&
      isNodeJS &&
      typeof val === "string"
    ) {
      return val; 
    }
  }
  throw new Error(
    "Invalid PDF url data: " +
      "either string or URL-object is expected in the url property."
  );
}
function getDataProp(val) {