effect-io-ai

Package: effect
Module: Stream

Stream.when

Returns the specified stream if the given condition is satisfied, otherwise returns an empty stream.

Signature

declare const when: { (test: LazyArg<boolean>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>; <A, E, R>(self: Stream<A, E, R>, test: LazyArg<boolean>): Stream<A, E, R>; }

Source

Since v2.0.0