import * as tsplus_module_1 from "@effect/core/io/Effect/operations/succeed";
import * as tsplus_module_2 from "@effect/core/stream/Stream/operations/whenEffect";
/**
 * Returns the specified stream if the given condition is satisfied, otherwise
 * returns an empty stream.
 *
 * @tsplus static ets/Stream/Ops when
 */

export function when(b, stream, __tsplusTrace) {
  return tsplus_module_2.whenEffect(() => tsplus_module_1.succeed(b, __tsplusTrace), stream, __tsplusTrace);
}
//# sourceMappingURL=when.mjs.map