canvasMaxAreaInBytes in DocumentInitParameters has type Boolean, preventing TypeScript users from passing the correct (numeric) value.
initialData: rangeTransport.initialData,
              progressiveDone: rangeTransport.progressiveDone,
              contentDispositionFilename:
                rangeTransport.contentDispositionFilename,
              disableRange,
              disableStream,
            },
            rangeTransport
          );
        } else if (!data) {
          if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
            throw new Error("Not implemented: createPDFNetworkStream");
          }
          networkStream = createPDFNetworkStream({
            url,
            length,
            httpHeaders,
            withCredentials,
            rangeChunkSize,
            disableRange,
            disableStream,
          });
        }
        resolve(networkStream);
      });
      return Promise.all([workerIdPromise, networkStreamPromise]).then(
        function ([workerId, networkStream]) {
          if (task.destroyed) {
            throw new Error("Loading aborted");
          }