import { Stream } from "@effect/core/stream/Stream/definition";
import { Cause } from "@effect/core/io/Cause/definition";
import { Effect } from "@effect/core/io/Effect/definition";
/**
 * Runs the specified effect if this stream fails, providing the error to the
 * effect if it exists.
 *
 * Note: Unlike `Effect.onError`, there is no guarantee that the provided
 * effect will not be interrupted.
 * @tsplus fluent ets/Stream onError
 * @tsplus location "@effect/core/stream/Stream/operations/onError"
 */
export declare function onError_<R, E, A, R2, Z>(self: Stream<R, E, A>, cleanup: (cause: Cause<E>) => Effect<R2, never, Z>, __tsplusTrace?: string): Stream<R | R2, E, A>;
/**
 * Runs the specified effect if this stream fails, providing the error to the
 * effect if it exists.
 *
 * Note: Unlike `Effect.onError`, there is no guarantee that the provided
 * effect will not be interrupted.
 * @tsplus static ets/Stream/Aspects onError
 * @tsplus pipeable ets/Stream onError
 * @tsplus location "@effect/core/stream/Stream/operations/onError"
 */
export declare const onError: <E, R2, Z>(cleanup: (cause: import("../../../io/Cause").Cause<E>) => import("../../../io/Effect").Effect<R2, never, Z>, __tsplusTrace?: string) => <R, A>(self: import("../definition").Stream<R, E, A>) => import("../definition").Stream<R | R2, E, A>;
//# sourceMappingURL=onError.d.ts.map