@azure/core-client 1.6.2-alpha.20221129.2 → 1.6.2-alpha.20221201.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -502,8 +502,9 @@ function serializeBasicTypes(typeName, objectName, value) {
502
502
  !(value instanceof ArrayBuffer) &&
503
503
  !ArrayBuffer.isView(value) &&
504
504
  // File objects count as a type of Blob, so we want to use instanceof explicitly
505
- !((typeof Blob === "function" || typeof Blob === "object") && value instanceof Blob)) {
506
- throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, or NodeJS.ReadableStream.`);
505
+ !((typeof Blob === "function" || typeof Blob === "object") && value instanceof Blob) &&
506
+ objectType !== "function") {
507
+ throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, NodeJS.ReadableStream, or () => NodeJS.ReadableStream.`);
507
508
  }
508
509
  }
509
510
  }