Import
import { filter } from "@typed/fx/Push";Signatures
export declare const filter: {
<B>(f: (b: B) => boolean): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, B, E2, R2>;
<A, E, R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>, f: (b: B) => boolean): Push<A, E, R, B, E2, R2>;
};Why
Restrict observed events without restricting which commands the Push accepts.
Ownership and lifetime
The predicate is synchronous at upstream onSuccess invocation and
resource-free. Subscription, interruption, failures, services, and cleanup
remain those of the wrapped Fx.
Examples
import { Effect } from "effect"
import * as Fx from "@typed/fx/Fx"
import * as Push from "@typed/fx/Push"
import * as Sink from "@typed/fx/Sink"
const push = Push.make(Sink.make(() => Effect.void, (_: string) => Effect.void), Fx.fromIterable([1, 2, 3]))
const even = Push.filter(push, (n) => n % 2 === 0)Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.