"use strict";
/**
 * Lightweight runtime type guards shared across modules.
 *
 * Keep this file dependency-free to maximize deduping in bundled builds.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.isReadableStream = isReadableStream;
exports.isWritableStream = isWritableStream;
exports.isAsyncIterable = isAsyncIterable;
exports.isTransformStream = isTransformStream;
function isReadableStream(value) {
    return !!value && typeof value === "object" && typeof value.getReader === "function";
}
function isWritableStream(value) {
    return !!value && typeof value === "object" && typeof value.getWriter === "function";
}
function isAsyncIterable(value) {
    return (!!value &&
        (typeof value === "object" || typeof value === "function") &&
        typeof value[Symbol.asyncIterator] === "function");
}
function isTransformStream(value) {
    return (!!value &&
        typeof value === "object" &&
        !!value.readable &&
        !!value.writable &&
        isReadableStream(value.readable) &&
        isWritableStream(value.writable));
}
