Fixed the return type of isReadableStream

Previously, it would return `undefined` instead of `false` when `stream` was undefined.
This commit is contained in:
Kir_Antipov 2024-01-04 10:31:14 +00:00
parent c35cdf9d6f
commit 814b583fb0

View file

@ -50,7 +50,7 @@ export function isStreamableHttpRequestBody(body: unknown): body is Blob | Buffe
function isReadableStream(stream: unknown): stream is NodeJS.ReadableStream {
const s = stream as NodeJS.ReadableStream;
return (
s &&
!!s &&
typeof s.read === "function" &&
typeof s.pause === "function" &&
typeof s.resume === "function" &&