Import
import { Sink } from "@typed/fx";Access Sink.dropAfter through the imported Sink export. Its declaration below describes the member.
This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.
Signatures
export declare const dropAfter: {
<A, E, R, R2>(sink: Sink<A, E, R>, predicate: Predicate<A>, f: (sink: Sink<A, E, R>) => Effect.Effect<unknown, E, R2>): Effect.Effect<void, never, R | R2>;
};Why
Unlike a filtering operation, dropAfter includes the boundary value and then terminates
producer work normally.
Ownership and lifetime
Values are forwarded in order through the first predicate match, then early exit completes and aborts the callback fiber. Callback failure is caught and sent to the original sink. The predicate is synchronous; thrown exceptions are defects.
Examples
import { Effect } from "effect"
import * as Sink from "@typed/fx/Sink"
const target = Sink.make(Effect.logError, Effect.log)
const program = Sink.dropAfter(target, (n: number) => n >= 10, (limited) => limited.onSuccess(10))Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.