@azure/core-client 1.7.4-alpha.20230727.2 → 1.7.4-alpha.20230908.2

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
@@ -499,13 +499,14 @@ function serializeBasicTypes(typeName, objectName, value) {
499
499
  else if (typeName.match(/^Stream$/i) !== null) {
500
500
  const objectType = typeof value;
501
501
  if (objectType !== "string" &&
502
- typeof value.pipe !== "function" &&
502
+ typeof value.pipe !== "function" && // NodeJS.ReadableStream
503
+ typeof value.tee !== "function" && // browser ReadableStream
503
504
  !(value instanceof ArrayBuffer) &&
504
505
  !ArrayBuffer.isView(value) &&
505
506
  // File objects count as a type of Blob, so we want to use instanceof explicitly
506
507
  !((typeof Blob === "function" || typeof Blob === "object") && value instanceof Blob) &&
507
508
  objectType !== "function") {
508
- throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, NodeJS.ReadableStream, or () => NodeJS.ReadableStream.`);
509
+ throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`);
509
510
  }
510
511
  }
511
512
  }